From 909bbc79fd2dc1d3a36e3109ba32a22e162b2b7f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 30 Aug 2017 11:51:45 +0200 Subject: Switch to -fmodule-file==, requires Clang 6.0/trunk --- build2/cc/compile.cxx | 14 +++++++------- build2/cxx/init.cxx | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'build2') 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 (f.vars[c_module_name])); - // s.insert (0, "-fmodule-file="); - //} + else + { + s.insert (0, 1, '='); + s.insert (0, cast (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"); -- cgit v1.1