aboutsummaryrefslogtreecommitdiffstats
path: root/cc/config
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-10-07 13:12:58 -0700
committerElliott Hughes <enh@google.com>2016-10-13 14:41:31 +0000
commit5a0401ab9c95eb8a7359724a630637d88db4994f (patch)
tree83a0423e426cfc6b97f9ecf9fdf19f104f4fde74 /cc/config
parentfc754581fc1bbc42586a7ac6df3f9eddcbb6955f (diff)
downloadbuild_soong-5a0401ab9c95eb8a7359724a630637d88db4994f.tar.gz
build_soong-5a0401ab9c95eb8a7359724a630637d88db4994f.tar.bz2
build_soong-5a0401ab9c95eb8a7359724a630637d88db4994f.zip
Consistently use -std=gnu99 for gcc as well as clang.
This matters for C files that are also built for Windows. Previously they'd be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for Windows. Bug: http://b/32019064 Test: builds, and can build libcrypto_utils without a manual -std= line Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
Diffstat (limited to 'cc/config')
-rw-r--r--cc/config/clang.go4
-rw-r--r--cc/config/global.go5
2 files changed, 5 insertions, 4 deletions
diff --git a/cc/config/clang.go b/cc/config/clang.go
index 13a7e66a..10f4cea9 100644
--- a/cc/config/clang.go
+++ b/cc/config/clang.go
@@ -93,10 +93,6 @@ func init() {
"-Wno-expansion-to-defined",
}, " "))
- pctx.StaticVariable("ClangExtraConlyflags", strings.Join([]string{
- "-std=gnu99",
- }, " "))
-
pctx.StaticVariable("ClangExtraCppflags", strings.Join([]string{
// Disable -Winconsistent-missing-override until we can clean up the existing
// codebase for it.
diff --git a/cc/config/global.go b/cc/config/global.go
index 7209d16f..9b776629 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -37,6 +37,10 @@ var (
"-UDEBUG",
}
+ commonGlobalConlyflags = []string{
+ "-std=gnu99",
+ }
+
deviceGlobalCflags = []string{
"-fdiagnostics-color",
@@ -72,6 +76,7 @@ func init() {
}
pctx.StaticVariable("CommonGlobalCflags", strings.Join(commonGlobalCflags, " "))
+ pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
pctx.StaticVariable("DeviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
pctx.StaticVariable("HostGlobalCflags", strings.Join(hostGlobalCflags, " "))
pctx.StaticVariable("NoOverrideGlobalCflags", strings.Join(noOverrideGlobalCflags, " "))