Add -fno-canonical-system-headers to improve sandboxing
Without this, gcc sometimes likes to "helpfully" shorten include paths
to absolute paths, which doesn't play nice with Bazel's sandboxing.
Change-Id: I11d63b66682444ed3b63714c73c9f1158c272c35
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL
index 12d69ec..c7a846f 100644
--- a/tools/cpp/CROSSTOOL
+++ b/tools/cpp/CROSSTOOL
@@ -439,6 +439,16 @@
}
}
flag_set {
+ action: "assemble"
+ action: "preprocess-assemble"
+ action: "c++-compile"
+ action: "c++-header-parsing"
+ action: "c++-header-preprocessing"
+ flag_group {
+ flag: "-fno-canonical-system-headers"
+ }
+ }
+ flag_set {
action: "c++-compile"
action: "c++-header-parsing"
action: "c++-module-compile"