Remove `clang: false` support
am: 742a5453c2
Change-Id: Idcb738ca7cb39882157f36ca44ef492fe2a8b0a0
diff --git a/cc/cc.go b/cc/cc.go
index f8a8225..bde8041 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -159,9 +159,12 @@
// Properties used to compile all C or C++ modules
type BaseProperties struct {
- // compile module with clang instead of gcc
+ // Deprecated. true is the default, false is invalid.
Clang *bool `android:"arch_variant"`
+ // Some internals still need GCC (toolchain_library)
+ Gcc bool `blueprint:"mutated"`
+
// Minimum sdk version supported when compiling against the ndk
Sdk_version *string
@@ -1080,17 +1083,15 @@
}
func (c *Module) clang(ctx BaseModuleContext) bool {
- clang := Bool(c.Properties.Clang)
-
- if c.Properties.Clang == nil {
- clang = true
+ if c.Properties.Clang != nil && *c.Properties.Clang == false {
+ ctx.PropertyErrorf("clang", "false (GCC) is no longer supported")
}
if !c.toolchain(ctx).ClangSupported() {
- clang = false
+ panic("GCC is no longer supported")
}
- return clang
+ return !c.Properties.Gcc
}
// Whether a module can link to another module, taking into
diff --git a/cc/toolchain_library.go b/cc/toolchain_library.go
index 2bb4018..2b117b3 100644
--- a/cc/toolchain_library.go
+++ b/cc/toolchain_library.go
@@ -43,7 +43,7 @@
}
module.compiler = toolchainLibrary
module.linker = toolchainLibrary
- module.Properties.Clang = BoolPtr(false)
+ module.Properties.Gcc = true
module.stl = nil
module.sanitize = nil
module.installer = nil