diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-11 16:24:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-11 16:24:37 +0200 |
commit | e58957d6491a08ec212958457c29a14eec787279 (patch) | |
tree | ef8d6f76436d9d404a1f91f4b4f80921e967095f /build2/cxx/module.cxx | |
parent | a5592d2ddbce898766dd103ae9a4fe6887ab5209 (diff) |
Implement --config-{guess,sub} options
Diffstat (limited to 'build2/cxx/module.cxx')
-rw-r--r-- | build2/cxx/module.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/build2/cxx/module.cxx b/build2/cxx/module.cxx index 9ebcc52..8e83a9b 100644 --- a/build2/cxx/module.cxx +++ b/build2/cxx/module.cxx @@ -4,11 +4,10 @@ #include <build2/cxx/module> -#include <butl/process> #include <butl/triplet> -#include <butl/fdstream> #include <build2/scope> +#include <build2/context> #include <build2/diagnostics> #include <build2/config/utility> @@ -213,6 +212,17 @@ namespace build2 // Split/canonicalize the target. // + + // Did the user ask us to use config.sub? + // + if (ops.config_sub_specified ()) + { + ci.target = run<string> (ops.config_sub (), + ci.target.c_str (), + [] (string& l) {return move (l);}); + l5 ([&]{trace << "config.sub target: '" << ci.target << "'";}); + } + try { string canon; @@ -236,7 +246,8 @@ namespace build2 // --config-sub to help us out. // fail << "unable to parse compiler target '" << ci.target << "': " - << e.what (); + << e.what () << + info << "consider using the --config-sub option"; } } |