Toolchain modules use GCC
Don't use clang cflags if the device uses clang by default.
Change-Id: Ice8474ae1f5e6f37fc8b47b1679d7fbdb9249e5a
diff --git a/cc/cc.go b/cc/cc.go
index bc48622..6cff27f 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1882,6 +1882,7 @@
module := &toolchainLibrary{}
module.LibraryProperties.BuildStatic = true
+ module.Properties.Clang = proptools.BoolPtr(false)
return newCCBase(&module.CCBase, module, common.DeviceSupported, common.MultilibBoth,
&module.LibraryProperties)
@@ -1893,6 +1894,10 @@
libName := ctx.ModuleName() + staticLibraryExtension
outputFile := common.PathForModuleOut(ctx, libName)
+ if flags.Clang {
+ ctx.ModuleErrorf("toolchain_library must use GCC, not Clang")
+ }
+
CopyGccLib(ctx, libName, ccFlagsToBuilderFlags(flags), outputFile)
c.out = outputFile