Consolidate -std flags
Define the default -std values in global.go, export them in makevars.go,
and use them in compiler.go.
Test: builds
Change-Id: Ia2ae01f63e182d0ad7f371e6d32184bff35a8897
diff --git a/cc/config/global.go b/cc/config/global.go
index 9b77662..348c586 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -37,9 +37,7 @@
"-UDEBUG",
}
- commonGlobalConlyflags = []string{
- "-std=gnu99",
- }
+ commonGlobalConlyflags = []string{}
deviceGlobalCflags = []string{
"-fdiagnostics-color",
@@ -66,6 +64,10 @@
IllegalFlags = []string{
"-w",
}
+
+ CStdVersion = "gnu99"
+ CppStdVersion = "gnu++14"
+ GccCppStdVersion = "gnu++11"
)
var pctx = android.NewPackageContext("android/soong/cc/config")