From db8336a686a85f0e458acb2d5f1ad442585bfc9a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 1 Oct 2021 11:05:49 +0200 Subject: Add notion of internal scope, translate external -I to -isystem or equivalent --- libbuild2/cc/init.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libbuild2/cc/init.cxx') diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index 07f082f..769f6bb 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -97,12 +97,14 @@ namespace build2 vp.insert ("config.cc.loptions"); vp.insert ("config.cc.aoptions"); vp.insert ("config.cc.libs"); + vp.insert ("config.cc.internal.scope"); vp.insert ("cc.poptions"); vp.insert ("cc.coptions"); vp.insert ("cc.loptions"); vp.insert ("cc.aoptions"); vp.insert ("cc.libs"); + vp.insert ("cc.internal.scope"); vp.insert ("cc.export.poptions"); vp.insert ("cc.export.coptions"); @@ -298,6 +300,24 @@ namespace build2 rs.assign ("cc.libs") += cast_null ( lookup_config (rs, "config.cc.libs", nullptr)); + // config.cc.internal.scope + // + // Note: save omitted. + // + if (lookup l = lookup_config (rs, "config.cc.internal.scope")) + { + if (cast (l) == "current") + fail << "'current' value in config.cc.internal.scope"; + + // This is necessary in case we are acting as bundle amalgamation. + // + rs.assign ("cc.internal.scope") = *l; + } + + // config.cc.reprocess + // + // Note: save omitted. + // if (lookup l = lookup_config (rs, "config.cc.reprocess")) rs.assign ("cc.reprocess") = *l; -- cgit v1.1