From aaf2525e9e8ed356feba437e56df737428a52f55 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 17 May 2017 15:13:58 +0200 Subject: Add ability to disable use of preprocessed output in compilation This can be done from a buildfile for a scope (including project root scope) and per target via cc.reprocess: cc.reprocess = true obj{hello}: cc.reprocess = false As as well externally via config.cc.reprocess: b config.cc.reprocess=true [configure] --- build2/cc/init.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index 8d20573..a5fcf83 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -78,6 +78,11 @@ namespace build2 // v.insert ("cc.system"); + // Ability to disable using preprocessed output for compilation. + // + v.insert ("config.cc.reprocess", true); + v.insert ("cc.reprocess"); + return true; } @@ -166,6 +171,9 @@ namespace build2 rs.assign ("cc.libs") += cast_null ( config::optional (rs, "config.cc.libs")); + if (lookup l = config::omitted (rs, "config.cc.reprocess").first) + rs.assign ("cc.reprocess") = *l; + // Load the bin.config module. // if (!cast_false (rs["bin.config.loaded"])) -- cgit v1.1