From af19a29bb709d14acbbb112165b69657bb06e88c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 18 Mar 2015 12:07:10 -0700 Subject: [PATCH] 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 --- cc/cc.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cc/cc.go b/cc/cc.go index 8abfae7da..d56242111 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -200,6 +200,13 @@ type ccProperties struct { // Set for combined shared/static libraries to prevent compiling object files a second time 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 { @@ -371,6 +378,9 @@ func (c *ccBase) flags(ctx common.AndroidModuleContext, toolchain toolchain) ccF ctx.ModuleErrorf("%s", err) } + // TODO: debug + flags.cFlags = append(flags.cFlags, c.properties.Release.Cflags...) + if arch.HostOrDevice.Host() { // TODO: allow per-module clang disable for host flags.clang = true