aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-01 11:05:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-01 11:05:49 +0200
commit248b79eba58d88766c6fe3fb87f8dfda5f86a615 (patch)
tree2acde6176840cd00b5019203bc729794ed745e9f /libbuild2/c
parentf63c0548281015ca1f7d71079c0880e3634063fb (diff)
Add notion of internal scope, translate external -I to -isystem or equivalent
Diffstat (limited to 'libbuild2/c')
-rw-r--r--libbuild2/c/init.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx
index d6622a8..9a62a5e 100644
--- a/libbuild2/c/init.cxx
+++ b/libbuild2/c/init.cxx
@@ -180,7 +180,12 @@ namespace build2
vp.insert<strings> ("config.c.loptions"),
vp.insert<strings> ("config.c.aoptions"),
vp.insert<strings> ("config.c.libs"),
- nullptr /* config.c.translate_include */,
+
+ // See config.cxx.internal.scope for details.
+ //
+ vp.insert<string> ("config.c.internal.scope"),
+
+ nullptr /* config.c.translate_include */,
vp.insert<process_path_ex> ("c.path"),
vp.insert<strings> ("c.mode"),
@@ -197,7 +202,9 @@ namespace build2
vp.insert<strings> ("c.aoptions"),
vp.insert<strings> ("c.libs"),
- nullptr /* c.translate_include */,
+ vp.insert<string> ("c.internal.scope"),
+
+ nullptr /* c.translate_include */,
vp["cc.poptions"],
vp["cc.coptions"],
@@ -345,6 +352,8 @@ namespace build2
cm.x_info->class_,
cm.x_info->version.major,
cm.x_info->version.minor,
+ cm.x_info->variant_version ? cm.x_info->variant_version->major : 0,
+ cm.x_info->variant_version ? cm.x_info->variant_version->minor : 0,
cast<process_path> (rs[cm.x_path]),
cast<strings> (rs[cm.x_mode]),
cast<target_triplet> (rs[cm.x_target]),
@@ -353,6 +362,9 @@ namespace build2
false, // No C modules yet.
false, // No __symexport support since no modules.
+ cm.internal_scope,
+ cm.internal_scope_current,
+
cast<dir_paths> (rs[cm.x_sys_lib_dirs]),
cast<dir_paths> (rs[cm.x_sys_hdr_dirs]),
cm.x_info->sys_mod_dirs ? &cm.x_info->sys_mod_dirs->first : nullptr,