From ce177a4b12f2fef490683e53ccc9ee8f4d3e0bd6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Jun 2017 08:33:28 +0200 Subject: Add workaround for Clang module import during preprocessing --- build2/cxx/init.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build2/cxx') diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx index 32ba8b6..8c4249c 100644 --- a/build2/cxx/init.cxx +++ b/build2/cxx/init.cxx @@ -142,8 +142,8 @@ namespace build2 // if (mj > 19 || (mj == 19 && mi >= 11)) { - r.push_back ("/experimental:module"); r.push_back ("/D__cpp_modules=201703"); // n4647 + r.push_back ("/experimental:module"); modules = true; } break; @@ -168,10 +168,12 @@ namespace build2 // Note that we are using Apple to vanilla Clang version re- // map from above so may need to update things there as well. // + // Note: see Clang modules support hack in cc::compile. + // if (mj >= 5) { - r.push_back ("-fmodules-ts"); r.push_back ("-D__cpp_modules=201704"); // p0629r0 + r.push_back ("-fmodules-ts"); modules = true; } break; -- cgit v1.1