Export -D__BRILLO__ to make if necessary
Fixes Brillo builds Change-Id: Ia3563b0c9e000d95ed18d05460f5c8c32e04e191
This commit is contained in:
@@ -74,6 +74,10 @@ func makeVarsToolchain(ctx common.MakeVarsContext, secondPrefix string,
|
|||||||
|
|
||||||
globalCflags := fmt.Sprintf("${commonGlobalCflags} ${%sGlobalCflags}", hod)
|
globalCflags := fmt.Sprintf("${commonGlobalCflags} ${%sGlobalCflags}", hod)
|
||||||
|
|
||||||
|
if hod.Device() && Bool(ctx.Config().ProductVariables.Brillo) {
|
||||||
|
globalCflags += " -D__BRILLO__"
|
||||||
|
}
|
||||||
|
|
||||||
ctx.StrictSorted(makePrefix+"GLOBAL_CFLAGS", strings.Join([]string{
|
ctx.StrictSorted(makePrefix+"GLOBAL_CFLAGS", strings.Join([]string{
|
||||||
toolchain.ToolchainCflags(),
|
toolchain.ToolchainCflags(),
|
||||||
globalCflags,
|
globalCflags,
|
||||||
@@ -93,6 +97,10 @@ func makeVarsToolchain(ctx common.MakeVarsContext, secondPrefix string,
|
|||||||
|
|
||||||
globalClangCflags := fmt.Sprintf("${commonClangGlobalCflags} ${clangExtraCflags} ${%sClangGlobalCflags}", hod)
|
globalClangCflags := fmt.Sprintf("${commonClangGlobalCflags} ${clangExtraCflags} ${%sClangGlobalCflags}", hod)
|
||||||
|
|
||||||
|
if hod.Device() && Bool(ctx.Config().ProductVariables.Brillo) {
|
||||||
|
globalClangCflags += " -D__BRILLO__"
|
||||||
|
}
|
||||||
|
|
||||||
ctx.StrictSorted(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
|
ctx.StrictSorted(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
|
||||||
toolchain.ToolchainClangCflags(),
|
toolchain.ToolchainClangCflags(),
|
||||||
globalClangCflags,
|
globalClangCflags,
|
||||||
|
Reference in New Issue
Block a user