aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/cxx/init.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx
index adb1d92..3fb636f 100644
--- a/build2/cxx/init.cxx
+++ b/build2/cxx/init.cxx
@@ -293,11 +293,15 @@ namespace build2
}
case compiler_type::gcc:
{
- // Enable starting with GCC 9.0.0 (currently the c++-modules
- // branch).
+ // We now use extended/experimental module mapper support which
+ // is currently only available in our c++-modules-ex branch.
+ // But let's allow forcing it to plain c++-modules in case
+ // things got merged, etc.
//
- if (mj >= 9 &&
- ci.version.build.find ("c++-modules") != string::npos)
+ if (mj >= 10 &&
+ ci.version.build.find (l
+ ? "c++-modules"
+ : "c++-modules-ex") != string::npos)
{
// Currently defines __cpp_modules=201810 which is said to
// correspond to p1103 (merged modules).
@@ -316,6 +320,9 @@ namespace build2
//
// Also see Clang modules support hack in cc::compile.
//
+ // @@ Clang 9 enables modules by default in C++2a. We should
+ // probably reflect this in the modules value.
+ //
if (mj >= 6)
{
r.push_back ("-D__cpp_modules=201704"); // p0629r0