Toolchain modules use GCC
Don't use clang cflags if the device uses clang by default. Change-Id: Ice8474ae1f5e6f37fc8b47b1679d7fbdb9249e5a
This commit is contained in:
5
cc/cc.go
5
cc/cc.go
@@ -1882,6 +1882,7 @@ func ToolchainLibraryFactory() (blueprint.Module, []interface{}) {
|
||||
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 @@ func (c *toolchainLibrary) compileModule(ctx common.AndroidModuleContext,
|
||||
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
|
||||
|
Reference in New Issue
Block a user