diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-08 11:07:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-08 11:07:17 +0200 |
commit | f6c3788de3d148c90aba705d045b1d92e7fea20a (patch) | |
tree | 3e99d4a3d87ab4f6c68cbfd0060e28b465bee4de /build2/cc/module.cxx | |
parent | f1b3c0e86daec1f5b7ed81a60edbe548fcbb5f42 (diff) |
Complete runtime/stdlib detection
Diffstat (limited to 'build2/cc/module.cxx')
-rw-r--r-- | build2/cc/module.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/build2/cc/module.cxx b/build2/cc/module.cxx index 5b1a79a..1020bd6 100644 --- a/build2/cc/module.cxx +++ b/build2/cc/module.cxx @@ -42,7 +42,9 @@ namespace build2 config::save_module (rs, x, 250); + const variable& config_c_poptions (var_pool["config.cc.poptions"]); const variable& config_c_coptions (var_pool["config.cc.coptions"]); + const variable& config_c_loptions (var_pool["config.cc.loptions"]); // config.x // @@ -107,8 +109,12 @@ namespace build2 const path& xc (cast<path> (*p.first)); ci = build2::cc::guess (x_lang, xc, + cast_null<strings> (rs[config_c_poptions]), + cast_null<strings> (rs[config_x_poptions]), cast_null<strings> (rs[config_c_coptions]), - cast_null<strings> (rs[config_x_coptions])); + cast_null<strings> (rs[config_x_coptions]), + cast_null<strings> (rs[config_c_loptions]), + cast_null<strings> (rs[config_x_loptions])); // Split/canonicalize the target. First see if the user asked us to // use config.sub. @@ -171,7 +177,7 @@ namespace build2 rs.assign (x_pattern) = ci.pattern; if (!x_stdlib.aliases (c_stdlib)) - rs.assign (x_stdlib) = move (ci.x_stdlib); + rs.assign (x_stdlib) = ci.x_stdlib; new_ = p.second; @@ -351,11 +357,11 @@ namespace build2 if (ct != ci.original_target) dr << " (" << ci.original_target << ")"; - - // @@ Print c_stdlib? - // dr << "\n runtime " << ci.runtime << "\n stdlib " << ci.x_stdlib; + + if (!x_stdlib.aliases (c_stdlib)) + dr << "\n c stdlib " << ci.c_stdlib; } if (!tstd.empty ()) |