Move -fno-canonical-system-headers to global cflags
-fno-canonical-system-headers is required for gcc to use relative
paths to system headers in deps files, and is stripped out for
clang. Move it to the global flags so it affects windows gcc builds.
Bug: 68719465
Test: m checkbuild
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja -t deps | grep -E '^[[:space:]]*/' | sort | uniq
Change-Id: Ia9befd7cf8cfd714241e636fb786c319aecc79fe
diff --git a/cc/config/global.go b/cc/config/global.go
index 7362f2e..de4fa11 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -36,6 +36,7 @@
// Make paths in deps files relative
"-no-canonical-prefixes",
+ "-fno-canonical-system-headers",
"-DNDEBUG",
"-UDEBUG",
@@ -54,7 +55,6 @@
deviceGlobalCflags = []string{
"-fdiagnostics-color",
- "-fno-canonical-system-headers",
"-ffunction-sections",
"-funwind-tables",
"-fstack-protector-strong",