Add debug and release cflags
Add debug: { cflags: [...] } and release: { cflags: [...] }. For now it always takes the release cflags, later a per-module debug selector will allow using the debug cflags. Change-Id: I40bc68267287db901e47e74983d0d61fda2b9367
This commit is contained in:
parent
5ccc730672
commit
af19a29bb7
10
cc/cc.go
10
cc/cc.go
|
@ -200,6 +200,13 @@ type ccProperties struct {
|
||||||
|
|
||||||
// Set for combined shared/static libraries to prevent compiling object files a second time
|
// Set for combined shared/static libraries to prevent compiling object files a second time
|
||||||
SkipCompileObjs bool `blueprint:"mutated"`
|
SkipCompileObjs bool `blueprint:"mutated"`
|
||||||
|
|
||||||
|
Debug struct {
|
||||||
|
Cflags []string `android:"arch_variant"`
|
||||||
|
} `android:"arch_variant"`
|
||||||
|
Release struct {
|
||||||
|
Cflags []string `android:"arch_variant"`
|
||||||
|
} `android:"arch_variant"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type unusedProperties struct {
|
type unusedProperties struct {
|
||||||
|
@ -371,6 +378,9 @@ func (c *ccBase) flags(ctx common.AndroidModuleContext, toolchain toolchain) ccF
|
||||||
ctx.ModuleErrorf("%s", err)
|
ctx.ModuleErrorf("%s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: debug
|
||||||
|
flags.cFlags = append(flags.cFlags, c.properties.Release.Cflags...)
|
||||||
|
|
||||||
if arch.HostOrDevice.Host() {
|
if arch.HostOrDevice.Host() {
|
||||||
// TODO: allow per-module clang disable for host
|
// TODO: allow per-module clang disable for host
|
||||||
flags.clang = true
|
flags.clang = true
|
||||||
|
|
Loading…
Reference in New Issue