aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/cc/compile-rule.cxx2
-rw-r--r--build2/cxx/init.cxx4
-rw-r--r--tests/cc/modules/testscript7
3 files changed, 8 insertions, 5 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index 92ba32d..9e307b6 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -558,7 +558,7 @@ namespace build2
{
case compiler_type::gcc:
{
- e += mod ? "nms" : o;
+ e += mod ? "gcm" : o;
break;
}
case compiler_type::clang:
diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx
index 0326d22..7174121 100644
--- a/build2/cxx/init.cxx
+++ b/build2/cxx/init.cxx
@@ -196,8 +196,8 @@ namespace build2
if (mj >= 9 &&
ci.version.build.find ("c++-modules") != string::npos)
{
- // Currently defines __cpp_modules=201804 which is said to
- // correspond to p0713 ('module;' leading marker).
+ // Currently defines __cpp_modules=201810 which is said to
+ // correspond to p1103 (merged modules).
//
r.push_back ("-fmodules-ts");
modules = true;
diff --git a/tests/cc/modules/testscript b/tests/cc/modules/testscript
index c31bacf..b5b94c1 100644
--- a/tests/cc/modules/testscript
+++ b/tests/cc/modules/testscript
@@ -191,14 +191,17 @@ $* test clean <<EOI
: module-marker
:
-: Test leading module marker (module;).
+: Test global module fragment/leading module marker (module;).
:
+cat <<EOI >=g.hxx;
+void g ();
+EOI
cat <<EOI >=core.mxx;
#if __cpp_modules >= 201804
module;
#endif
-void g ();
+#include "g.hxx"
EOI
cat <<<../core.mxx >+core.mxx;
ln -s ../core.cxx ../driver.cxx ./;