diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-30 11:51:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-30 11:56:01 +0200 |
commit | 909bbc79fd2dc1d3a36e3109ba32a22e162b2b7f (patch) | |
tree | 2f192433224b4887a58e0b22e715d91178e9a546 | |
parent | 44d0adb806b3238a79d71ecea53dce7ba6807d8e (diff) |
Switch to -fmodule-file=<name>=<file>, requires Clang 6.0/trunk
-rw-r--r-- | build2/cc/compile.cxx | 14 | ||||
-rw-r--r-- | build2/cxx/init.cxx | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 5133d64..9e720ed 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -3725,14 +3725,14 @@ namespace build2 // In Clang the module implementation's unit .pcm is special and // must be "loaded". // - //if (md.type == translation_type::module_impl && i == ms.start) + if (md.type == translation_type::module_impl && i == ms.start) s.insert (0, "-fmodule-file="); - //else - //{ - // s.insert (0, 1, '='); - // s.insert (0, cast<string> (f.vars[c_module_name])); - // s.insert (0, "-fmodule-file="); - //} + else + { + s.insert (0, 1, '='); + s.insert (0, cast<string> (f.vars[c_module_name])); + s.insert (0, "-fmodule-file="); + } break; } case compiler_id::msvc: diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx index 4ec2894..5bd14ee 100644 --- a/build2/cxx/init.cxx +++ b/build2/cxx/init.cxx @@ -171,14 +171,14 @@ namespace build2 } case compiler_id::clang: { - // Enable starting with Clang 5.0.0. + // Enable starting with Clang 6.0.0. // // Note that we are using Apple to vanilla Clang version re- // map from above so may need to update things there as well. // // Also see Clang modules support hack in cc::compile. // - if (mj >= 5) + if (mj >= 6) { r.push_back ("-D__cpp_modules=201704"); // p0629r0 r.push_back ("-fmodules-ts"); |