From 51ab0a979c5c53defd5eda9fa997b2abfd0d4f7d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 16 Jul 2020 09:05:04 +0200 Subject: Save original compiler path/mode in {c,cxx}.config.path/mode It turns out that when propagating {c,cxx}.config in tests we don't want to propagate any options (such as *.std) that have been folded into our project's mode. --- libbuild2/cc/module.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbuild2/cc/module.cxx') diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx index eed2510..1aa1e01 100644 --- a/libbuild2/cc/module.cxx +++ b/libbuild2/cc/module.cxx @@ -140,11 +140,17 @@ namespace build2 mode.assign (++v.begin (), v.end ()); + // Save original path/mode in *.config.path/mode. + // + rs.assign (x_c_path) = xc; + rs.assign (x_c_mode) = mode; + // Figure out which compiler we are dealing with, its target, etc. // // Note that we could allow guess() to modify mode to support // imaginary options (such as /MACHINE for cl.exe). Though it's not - // clear what cc.mode would contain (original or modified). + // clear what cc.mode would contain (original or modified). Note that + // we are now folding *.std options into mode options. // x_info = &build2::cc::guess ( x, x_lang, move (xc), -- cgit v1.1