Remove GCC support from Make
We need to keep support in Soong until toolchain_library no longer uses
GCC.
Test: out/build-aosp_arm64.ninja is the same before/after
Test: build_test on downstream branches
Change-Id: Ib78bcd6d5544afc3a3164f65fa72a3f08b2acf29
diff --git a/cc/cc.go b/cc/cc.go
index 2d967ed..358bff6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1089,10 +1089,6 @@
ctx.PropertyErrorf("clang", "false (GCC) is no longer supported")
}
- if !c.toolchain(ctx).ClangSupported() {
- panic("GCC is no longer supported")
- }
-
return !c.Properties.Gcc
}
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index fefe7c2..930b18f 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -57,7 +57,6 @@
IncludeFlags() string
InstructionSetFlags(string) (string, error)
- ClangSupported() bool
ClangTriple() string
ToolchainClangCflags() string
ToolchainClangLdflags() string
@@ -132,10 +131,6 @@
return ""
}
-func (toolchainBase) ClangSupported() bool {
- return true
-}
-
func (toolchainBase) ShlibSuffix() string {
return ".so"
}
diff --git a/cc/config/x86_windows_host.go b/cc/config/x86_windows_host.go
index 9003e85..65b9e6c 100644
--- a/cc/config/x86_windows_host.go
+++ b/cc/config/x86_windows_host.go
@@ -233,10 +233,6 @@
return "-F pe-x86-64"
}
-func (t *toolchainWindows) ClangSupported() bool {
- return true
-}
-
func (t *toolchainWindowsX86) ClangTriple() string {
return "i686-windows-gnu"
}
diff --git a/cc/makevars.go b/cc/makevars.go
index c4ef5f1..51089fd 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -136,7 +136,6 @@
ctx.Strict("DEFAULT_C_STD_VERSION", config.CStdVersion)
ctx.Strict("DEFAULT_CPP_STD_VERSION", config.CppStdVersion)
- ctx.Strict("DEFAULT_GCC_CPP_STD_VERSION", config.GccCppStdVersion)
ctx.Strict("EXPERIMENTAL_C_STD_VERSION", config.ExperimentalCStdVersion)
ctx.Strict("EXPERIMENTAL_CPP_STD_VERSION", config.ExperimentalCppStdVersion)
@@ -217,34 +216,6 @@
productExtraLdflags += "-static"
}
- ctx.Strict(makePrefix+"GLOBAL_CFLAGS", strings.Join([]string{
- toolchain.Cflags(),
- "${config.CommonGlobalCflags}",
- fmt.Sprintf("${config.%sGlobalCflags}", hod),
- toolchain.ToolchainCflags(),
- productExtraCflags,
- }, " "))
- ctx.Strict(makePrefix+"GLOBAL_CONLYFLAGS", strings.Join([]string{
- "${config.CommonGlobalConlyflags}",
- }, " "))
- ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
- "${config.CommonGlobalCppflags}",
- fmt.Sprintf("${config.%sGlobalCppflags}", hod),
- toolchain.Cppflags(),
- }, " "))
- ctx.Strict(makePrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
- fmt.Sprintf("${config.%sGlobalLdflags}", hod),
- toolchain.Ldflags(),
- toolchain.ToolchainLdflags(),
- productExtraLdflags,
- }, " "))
- ctx.Strict(makePrefix+"GLOBAL_LLDFLAGS", strings.Join([]string{
- fmt.Sprintf("${config.%sGlobalLldflags}", hod),
- toolchain.Ldflags(),
- toolchain.ToolchainLdflags(),
- productExtraLdflags,
- }, " "))
-
includeFlags, err := ctx.Eval(toolchain.IncludeFlags())
if err != nil {
panic(err)
@@ -267,60 +238,51 @@
ctx.Strict(makePrefix+"thumb_CFLAGS", flags)
}
- if toolchain.ClangSupported() {
- clangPrefix := secondPrefix + "CLANG_" + typePrefix
- clangExtras := "-target " + toolchain.ClangTriple()
- clangExtras += " -B" + config.ToolPath(toolchain)
+ clangPrefix := secondPrefix + "CLANG_" + typePrefix
+ clangExtras := "-target " + toolchain.ClangTriple()
+ clangExtras += " -B" + config.ToolPath(toolchain)
- ctx.Strict(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
- toolchain.ClangCflags(),
- "${config.CommonClangGlobalCflags}",
- fmt.Sprintf("${config.%sClangGlobalCflags}", hod),
- toolchain.ToolchainClangCflags(),
- clangExtras,
- productExtraCflags,
- }, " "))
- ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
- "${config.CommonClangGlobalCppflags}",
- fmt.Sprintf("${config.%sGlobalCppflags}", hod),
- toolchain.ClangCppflags(),
- }, " "))
- ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
- fmt.Sprintf("${config.%sGlobalLdflags}", hod),
- toolchain.ClangLdflags(),
- toolchain.ToolchainClangLdflags(),
- productExtraLdflags,
- clangExtras,
- }, " "))
- ctx.Strict(clangPrefix+"GLOBAL_LLDFLAGS", strings.Join([]string{
- fmt.Sprintf("${config.%sGlobalLldflags}", hod),
- toolchain.ClangLldflags(),
- toolchain.ToolchainClangLdflags(),
- productExtraLdflags,
- clangExtras,
- }, " "))
+ ctx.Strict(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
+ toolchain.ClangCflags(),
+ "${config.CommonClangGlobalCflags}",
+ fmt.Sprintf("${config.%sClangGlobalCflags}", hod),
+ toolchain.ToolchainClangCflags(),
+ clangExtras,
+ productExtraCflags,
+ }, " "))
+ ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
+ "${config.CommonClangGlobalCppflags}",
+ fmt.Sprintf("${config.%sGlobalCppflags}", hod),
+ toolchain.ClangCppflags(),
+ }, " "))
+ ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
+ fmt.Sprintf("${config.%sGlobalLdflags}", hod),
+ toolchain.ClangLdflags(),
+ toolchain.ToolchainClangLdflags(),
+ productExtraLdflags,
+ clangExtras,
+ }, " "))
+ ctx.Strict(clangPrefix+"GLOBAL_LLDFLAGS", strings.Join([]string{
+ fmt.Sprintf("${config.%sGlobalLldflags}", hod),
+ toolchain.ClangLldflags(),
+ toolchain.ToolchainClangLdflags(),
+ productExtraLdflags,
+ clangExtras,
+ }, " "))
- if target.Os.Class == android.Device {
- ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSanitizerRuntimeLibrary(toolchain), ".so"))
- ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerRuntimeLibrary(toolchain), ".so"))
- ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_STATIC_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerStaticLibrary(toolchain), ".a"))
- ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain), ".so"))
- ctx.Strict(secondPrefix+"UBSAN_MINIMAL_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerMinimalRuntimeLibrary(toolchain), ".a"))
- ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLibrary(toolchain), ".so"))
- ctx.Strict(secondPrefix+"SCUDO_RUNTIME_LIBRARY", strings.TrimSuffix(config.ScudoRuntimeLibrary(toolchain), ".so"))
- }
-
- // This is used by external/gentoo/...
- ctx.Strict("CLANG_CONFIG_"+target.Arch.ArchType.Name+"_"+typePrefix+"TRIPLE",
- toolchain.ClangTriple())
-
- ctx.Strict(makePrefix+"CLANG_SUPPORTED", "true")
- } else {
- ctx.Strict(makePrefix+"CLANG_SUPPORTED", "")
+ if target.Os.Class == android.Device {
+ ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSanitizerRuntimeLibrary(toolchain), ".so"))
+ ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerRuntimeLibrary(toolchain), ".so"))
+ ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_STATIC_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerStaticLibrary(toolchain), ".a"))
+ ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain), ".so"))
+ ctx.Strict(secondPrefix+"UBSAN_MINIMAL_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerMinimalRuntimeLibrary(toolchain), ".a"))
+ ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLibrary(toolchain), ".so"))
+ ctx.Strict(secondPrefix+"SCUDO_RUNTIME_LIBRARY", strings.TrimSuffix(config.ScudoRuntimeLibrary(toolchain), ".so"))
}
- ctx.Strict(makePrefix+"CC", gccCmd(toolchain, "gcc"))
- ctx.Strict(makePrefix+"CXX", gccCmd(toolchain, "g++"))
+ // This is used by external/gentoo/...
+ ctx.Strict("CLANG_CONFIG_"+target.Arch.ArchType.Name+"_"+typePrefix+"TRIPLE",
+ toolchain.ClangTriple())
if target.Os == android.Darwin {
ctx.Strict(makePrefix+"AR", "${config.MacArPath}")