aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-05-03 09:18:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-05-03 09:18:09 +0200
commit43c53a8b475f901a902ba1bf6ec603e7a28311b1 (patch)
tree1346eb64f63ee51c02c6ff3de13f86a32bda6464
parentff2ef3f33996d97d2c9c1c61ae3ce26fbe6b3cb4 (diff)
Adjust modules support enablement for GCC
Now we require c++-modules-ex branch unless forced.
-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