Merge "bp2build: generate arm toolchain flags into @soong_injection." am: 857d037566

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1714248

Change-Id: I922954a71f313ef99449d6492d1ed4146e4ea94f
This commit is contained in:
Jingwen Chen
2021-05-21 04:31:19 +00:00
committed by Automerger Merge Worker
5 changed files with 141 additions and 101 deletions

View File

@@ -163,56 +163,49 @@ var (
) )
const ( const (
name = "arm"
armGccVersion = "4.9" armGccVersion = "4.9"
gccTriple = "arm-linux-androideabi"
clangTriple = "armv7a-linux-androideabi"
) )
func init() { func init() {
pctx.StaticVariable("armGccVersion", armGccVersion) pctx.StaticVariable("armGccVersion", armGccVersion)
pctx.SourcePathVariable("ArmGccRoot", pctx.SourcePathVariable("ArmGccRoot", "prebuilts/gcc/${HostPrebuiltTag}/arm/arm-linux-androideabi-${armGccVersion}")
"prebuilts/gcc/${HostPrebuiltTag}/arm/arm-linux-androideabi-${armGccVersion}")
pctx.StaticVariable("ArmLdflags", strings.Join(armLdflags, " ")) // Just exported. Not created as a Ninja static variable.
pctx.StaticVariable("ArmLldflags", strings.Join(armLldflags, " ")) exportedStringVars.Set("ArmClangTriple", clangTriple)
exportStringListStaticVariable("ArmLdflags", armLdflags)
exportStringListStaticVariable("ArmLldflags", armLldflags)
// Clang cflags // Clang cflags
pctx.StaticVariable("ArmToolchainClangCflags", strings.Join(ClangFilterUnknownCflags(armToolchainCflags), " ")) exportStringListStaticVariable("ArmToolchainClangCflags", ClangFilterUnknownCflags(armToolchainCflags))
pctx.StaticVariable("ArmClangCflags", strings.Join(ClangFilterUnknownCflags(armCflags), " ")) exportStringListStaticVariable("ArmClangCflags", ClangFilterUnknownCflags(armCflags))
pctx.StaticVariable("ArmClangLdflags", strings.Join(ClangFilterUnknownCflags(armLdflags), " ")) exportStringListStaticVariable("ArmClangLdflags", ClangFilterUnknownCflags(armLdflags))
pctx.StaticVariable("ArmClangLldflags", strings.Join(ClangFilterUnknownCflags(armLldflags), " ")) exportStringListStaticVariable("ArmClangLldflags", ClangFilterUnknownCflags(armLldflags))
pctx.StaticVariable("ArmClangCppflags", strings.Join(ClangFilterUnknownCflags(armCppflags), " ")) exportStringListStaticVariable("ArmClangCppflags", ClangFilterUnknownCflags(armCppflags))
// Clang ARM vs. Thumb instruction set cflags // Clang ARM vs. Thumb instruction set cflags
pctx.StaticVariable("ArmClangArmCflags", strings.Join(ClangFilterUnknownCflags(armArmCflags), " ")) exportStringListStaticVariable("ArmClangArmCflags", ClangFilterUnknownCflags(armArmCflags))
pctx.StaticVariable("ArmClangThumbCflags", strings.Join(ClangFilterUnknownCflags(armThumbCflags), " ")) exportStringListStaticVariable("ArmClangThumbCflags", ClangFilterUnknownCflags(armThumbCflags))
// Clang arch variant cflags // Clang arch variant cflags
pctx.StaticVariable("ArmClangArmv7ACflags", exportStringListStaticVariable("ArmClangArmv7ACflags", armClangArchVariantCflags["armv7-a"])
strings.Join(armClangArchVariantCflags["armv7-a"], " ")) exportStringListStaticVariable("ArmClangArmv7ANeonCflags", armClangArchVariantCflags["armv7-a-neon"])
pctx.StaticVariable("ArmClangArmv7ANeonCflags", exportStringListStaticVariable("ArmClangArmv8ACflags", armClangArchVariantCflags["armv8-a"])
strings.Join(armClangArchVariantCflags["armv7-a-neon"], " ")) exportStringListStaticVariable("ArmClangArmv82ACflags", armClangArchVariantCflags["armv8-2a"])
pctx.StaticVariable("ArmClangArmv8ACflags",
strings.Join(armClangArchVariantCflags["armv8-a"], " "))
pctx.StaticVariable("ArmClangArmv82ACflags",
strings.Join(armClangArchVariantCflags["armv8-2a"], " "))
// Clang cpu variant cflags // Clang cpu variant cflags
pctx.StaticVariable("ArmClangGenericCflags", exportStringListStaticVariable("ArmClangGenericCflags", armClangCpuVariantCflags[""])
strings.Join(armClangCpuVariantCflags[""], " ")) exportStringListStaticVariable("ArmClangCortexA7Cflags", armClangCpuVariantCflags["cortex-a7"])
pctx.StaticVariable("ArmClangCortexA7Cflags", exportStringListStaticVariable("ArmClangCortexA8Cflags", armClangCpuVariantCflags["cortex-a8"])
strings.Join(armClangCpuVariantCflags["cortex-a7"], " ")) exportStringListStaticVariable("ArmClangCortexA15Cflags", armClangCpuVariantCflags["cortex-a15"])
pctx.StaticVariable("ArmClangCortexA8Cflags", exportStringListStaticVariable("ArmClangCortexA53Cflags", armClangCpuVariantCflags["cortex-a53"])
strings.Join(armClangCpuVariantCflags["cortex-a8"], " ")) exportStringListStaticVariable("ArmClangCortexA55Cflags", armClangCpuVariantCflags["cortex-a55"])
pctx.StaticVariable("ArmClangCortexA15Cflags", exportStringListStaticVariable("ArmClangKraitCflags", armClangCpuVariantCflags["krait"])
strings.Join(armClangCpuVariantCflags["cortex-a15"], " ")) exportStringListStaticVariable("ArmClangKryoCflags", armClangCpuVariantCflags["kryo"])
pctx.StaticVariable("ArmClangCortexA53Cflags",
strings.Join(armClangCpuVariantCflags["cortex-a53"], " "))
pctx.StaticVariable("ArmClangCortexA55Cflags",
strings.Join(armClangCpuVariantCflags["cortex-a55"], " "))
pctx.StaticVariable("ArmClangKraitCflags",
strings.Join(armClangCpuVariantCflags["krait"], " "))
pctx.StaticVariable("ArmClangKryoCflags",
strings.Join(armClangCpuVariantCflags["kryo"], " "))
} }
var ( var (
@@ -251,7 +244,7 @@ type toolchainArm struct {
} }
func (t *toolchainArm) Name() string { func (t *toolchainArm) Name() string {
return "arm" return name
} }
func (t *toolchainArm) GccRoot() string { func (t *toolchainArm) GccRoot() string {
@@ -259,7 +252,7 @@ func (t *toolchainArm) GccRoot() string {
} }
func (t *toolchainArm) GccTriple() string { func (t *toolchainArm) GccTriple() string {
return "arm-linux-androideabi" return gccTriple
} }
func (t *toolchainArm) GccVersion() string { func (t *toolchainArm) GccVersion() string {
@@ -272,7 +265,7 @@ func (t *toolchainArm) IncludeFlags() string {
func (t *toolchainArm) ClangTriple() string { func (t *toolchainArm) ClangTriple() string {
// http://b/72619014 work around llvm LTO bug. // http://b/72619014 work around llvm LTO bug.
return "armv7a-linux-androideabi" return clangTriple
} }
func (t *toolchainArm) ndkTriple() string { func (t *toolchainArm) ndkTriple() string {
@@ -312,7 +305,7 @@ func (t *toolchainArm) ClangInstructionSetFlags(isa string) (string, error) {
} }
func (toolchainArm) LibclangRuntimeLibraryArch() string { func (toolchainArm) LibclangRuntimeLibraryArch() string {
return "arm" return name
} }
func armToolchainFactory(arch android.Arch) Toolchain { func armToolchainFactory(arch android.Arch) Toolchain {

View File

@@ -22,29 +22,34 @@ import (
) )
// Helpers for exporting cc configuration information to Bazel. // Helpers for exporting cc configuration information to Bazel.
var ( var (
// Map containing toolchain variables that are independent of the // Map containing toolchain variables that are independent of the
// environment variables of the build. // environment variables of the build.
exportedVars = exportedVariablesMap{} exportedStringListVars = exportedStringListVariables{}
exportedStringVars = exportedStringVariables{}
) )
// variableValue is a string slice because the exported variables are all lists type exportedStringVariables map[string]string
// of string, and it's simpler to manipulate string lists before joining them type exportedStringListVariables map[string][]string
// into their final string representation.
type variableValue []string
// envDependentVariable is a toolchain variable computed based on an environment variable. func (m exportedStringVariables) Set(k string, v string) {
type exportedVariablesMap map[string]variableValue
func (m exportedVariablesMap) Set(k string, v variableValue) {
m[k] = v m[k] = v
} }
// Convenience function to declare a static variable and export it to Bazel's cc_toolchain. // Convenience function to declare a static variable and export it to Bazel's cc_toolchain.
func staticVariableExportedToBazel(name string, value []string) { func exportStringStaticVariable(name string, value string) {
pctx.StaticVariable(name, value)
exportedStringVars.Set(name, value)
}
func (m exportedStringListVariables) Set(k string, v []string) {
m[k] = v
}
// Convenience function to declare a static variable and export it to Bazel's cc_toolchain.
func exportStringListStaticVariable(name string, value []string) {
pctx.StaticVariable(name, strings.Join(value, " ")) pctx.StaticVariable(name, strings.Join(value, " "))
exportedVars.Set(name, variableValue(value)) exportedStringListVars.Set(name, value)
} }
// BazelCcToolchainVars generates bzl file content containing variables for // BazelCcToolchainVars generates bzl file content containing variables for
@@ -64,12 +69,12 @@ func BazelCcToolchainVars() string {
// For each exported variable, recursively expand elements in the variableValue // For each exported variable, recursively expand elements in the variableValue
// list to ensure that interpolated variables are expanded according to their values // list to ensure that interpolated variables are expanded according to their values
// in the exportedVars scope. // in the variable scope.
for _, k := range android.SortedStringKeys(exportedVars) { for _, k := range android.SortedStringKeys(exportedStringListVars) {
variableValue := exportedVars[k] variableValue := exportedStringListVars[k]
var expandedVars []string var expandedVars []string
for _, v := range variableValue { for _, v := range variableValue {
expandedVars = append(expandedVars, expandVar(v, exportedVars)...) expandedVars = append(expandedVars, expandVar(v, exportedStringVars, exportedStringListVars)...)
} }
// Build the list for this variable. // Build the list for this variable.
list := "[" list := "["
@@ -83,9 +88,22 @@ func BazelCcToolchainVars() string {
ret += "\n" ret += "\n"
} }
for _, k := range android.SortedStringKeys(exportedStringVars) {
variableValue := exportedStringVars[k]
expandedVar := expandVar(variableValue, exportedStringVars, exportedStringListVars)
if len(expandedVar) > 1 {
panic(fmt.Errorf("%s expands to more than one string value: %s", variableValue, expandedVar))
}
ret += fmt.Sprintf("_%s = \"%s\"\n", k, validateCharacters(expandedVar[0]))
ret += "\n"
}
// Build the exported constants struct. // Build the exported constants struct.
ret += "constants = struct(\n" ret += "constants = struct(\n"
for _, k := range android.SortedStringKeys(exportedVars) { for _, k := range android.SortedStringKeys(exportedStringVars) {
ret += fmt.Sprintf(" %s = _%s,\n", k, k)
}
for _, k := range android.SortedStringKeys(exportedStringListVars) {
ret += fmt.Sprintf(" %s = _%s,\n", k, k) ret += fmt.Sprintf(" %s = _%s,\n", k, k)
} }
ret += ")" ret += ")"
@@ -99,7 +117,7 @@ func BazelCcToolchainVars() string {
// string slice than to handle a pass-by-referenced map, which would make it // string slice than to handle a pass-by-referenced map, which would make it
// quite complex to track depth-first interpolations. It's also unlikely the // quite complex to track depth-first interpolations. It's also unlikely the
// interpolation stacks are deep (n > 1). // interpolation stacks are deep (n > 1).
func expandVar(toExpand string, exportedVars map[string]variableValue) []string { func expandVar(toExpand string, stringScope exportedStringVariables, stringListScope exportedStringListVariables) []string {
// e.g. "${ClangExternalCflags}" // e.g. "${ClangExternalCflags}"
r := regexp.MustCompile(`\${([a-zA-Z0-9_]+)}`) r := regexp.MustCompile(`\${([a-zA-Z0-9_]+)}`)
@@ -136,8 +154,11 @@ func expandVar(toExpand string, exportedVars map[string]variableValue) []string
newSeenVars[k] = true newSeenVars[k] = true
} }
newSeenVars[variable] = true newSeenVars[variable] = true
unexpandedVars := exportedVars[variable] if unexpandedVars, ok := stringListScope[variable]; ok {
for _, unexpandedVar := range unexpandedVars { for _, unexpandedVar := range unexpandedVars {
ret = append(ret, expandVarInternal(unexpandedVar, newSeenVars)...)
}
} else if unexpandedVar, ok := stringScope[variable]; ok {
ret = append(ret, expandVarInternal(unexpandedVar, newSeenVars)...) ret = append(ret, expandVarInternal(unexpandedVar, newSeenVars)...)
} }
} }

View File

@@ -20,54 +20,80 @@ import (
func TestExpandVars(t *testing.T) { func TestExpandVars(t *testing.T) {
testCases := []struct { testCases := []struct {
description string description string
exportedVars map[string]variableValue stringScope exportedStringVariables
toExpand string stringListScope exportedStringListVariables
expectedValues []string toExpand string
expectedValues []string
}{ }{
{ {
description: "single level expansion", description: "no expansion for non-interpolated value",
exportedVars: map[string]variableValue{ toExpand: "foo",
"foo": variableValue([]string{"bar"}), expectedValues: []string{"foo"},
},
{
description: "single level expansion for string var",
stringScope: exportedStringVariables{
"foo": "bar",
}, },
toExpand: "${foo}", toExpand: "${foo}",
expectedValues: []string{"bar"}, expectedValues: []string{"bar"},
}, },
{
description: "single level expansion string list var",
stringListScope: exportedStringListVariables{
"foo": []string{"bar"},
},
toExpand: "${foo}",
expectedValues: []string{"bar"},
},
{
description: "mixed level expansion for string list var",
stringScope: exportedStringVariables{
"foo": "${bar}",
"qux": "hello",
},
stringListScope: exportedStringListVariables{
"bar": []string{"baz", "${qux}"},
},
toExpand: "${foo}",
expectedValues: []string{"baz", "hello"},
},
{ {
description: "double level expansion", description: "double level expansion",
exportedVars: map[string]variableValue{ stringListScope: exportedStringListVariables{
"foo": variableValue([]string{"${bar}"}), "foo": []string{"${bar}"},
"bar": variableValue([]string{"baz"}), "bar": []string{"baz"},
}, },
toExpand: "${foo}", toExpand: "${foo}",
expectedValues: []string{"baz"}, expectedValues: []string{"baz"},
}, },
{ {
description: "double level expansion with a literal", description: "double level expansion with a literal",
exportedVars: map[string]variableValue{ stringListScope: exportedStringListVariables{
"a": variableValue([]string{"${b}", "c"}), "a": []string{"${b}", "c"},
"b": variableValue([]string{"d"}), "b": []string{"d"},
}, },
toExpand: "${a}", toExpand: "${a}",
expectedValues: []string{"d", "c"}, expectedValues: []string{"d", "c"},
}, },
{ {
description: "double level expansion, with two variables in a string", description: "double level expansion, with two variables in a string",
exportedVars: map[string]variableValue{ stringListScope: exportedStringListVariables{
"a": variableValue([]string{"${b} ${c}"}), "a": []string{"${b} ${c}"},
"b": variableValue([]string{"d"}), "b": []string{"d"},
"c": variableValue([]string{"e"}), "c": []string{"e"},
}, },
toExpand: "${a}", toExpand: "${a}",
expectedValues: []string{"d", "e"}, expectedValues: []string{"d", "e"},
}, },
{ {
description: "triple level expansion with two variables in a string", description: "triple level expansion with two variables in a string",
exportedVars: map[string]variableValue{ stringListScope: exportedStringListVariables{
"a": variableValue([]string{"${b} ${c}"}), "a": []string{"${b} ${c}"},
"b": variableValue([]string{"${c}", "${d}"}), "b": []string{"${c}", "${d}"},
"c": variableValue([]string{"${d}"}), "c": []string{"${d}"},
"d": variableValue([]string{"foo"}), "d": []string{"foo"},
}, },
toExpand: "${a}", toExpand: "${a}",
expectedValues: []string{"foo", "foo", "foo"}, expectedValues: []string{"foo", "foo", "foo"},
@@ -76,7 +102,7 @@ func TestExpandVars(t *testing.T) {
for _, testCase := range testCases { for _, testCase := range testCases {
t.Run(testCase.description, func(t *testing.T) { t.Run(testCase.description, func(t *testing.T) {
output := expandVar(testCase.toExpand, testCase.exportedVars) output := expandVar(testCase.toExpand, testCase.stringScope, testCase.stringListScope)
if len(output) != len(testCase.expectedValues) { if len(output) != len(testCase.expectedValues) {
t.Errorf("Expected %d values, got %d", len(testCase.expectedValues), len(output)) t.Errorf("Expected %d values, got %d", len(testCase.expectedValues), len(output))
} }

View File

@@ -98,7 +98,7 @@ var ClangTidyDisableChecks = []string{
} }
func init() { func init() {
staticVariableExportedToBazel("ClangExtraCflags", []string{ exportStringListStaticVariable("ClangExtraCflags", []string{
"-D__compiler_offsetof=__builtin_offsetof", "-D__compiler_offsetof=__builtin_offsetof",
// Emit address-significance table which allows linker to perform safe ICF. Clang does // Emit address-significance table which allows linker to perform safe ICF. Clang does
@@ -153,7 +153,7 @@ func init() {
"-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__", "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
}) })
staticVariableExportedToBazel("ClangExtraCppflags", []string{ exportStringListStaticVariable("ClangExtraCppflags", []string{
// -Wimplicit-fallthrough is not enabled by -Wall. // -Wimplicit-fallthrough is not enabled by -Wall.
"-Wimplicit-fallthrough", "-Wimplicit-fallthrough",
@@ -164,9 +164,9 @@ func init() {
"-Wno-gnu-include-next", "-Wno-gnu-include-next",
}) })
staticVariableExportedToBazel("ClangExtraTargetCflags", []string{"-nostdlibinc"}) exportStringListStaticVariable("ClangExtraTargetCflags", []string{"-nostdlibinc"})
staticVariableExportedToBazel("ClangExtraNoOverrideCflags", []string{ exportStringListStaticVariable("ClangExtraNoOverrideCflags", []string{
"-Werror=address-of-temporary", "-Werror=address-of-temporary",
// Bug: http://b/29823425 Disable -Wnull-dereference until the // Bug: http://b/29823425 Disable -Wnull-dereference until the
// new cases detected by this warning in Clang r271374 are // new cases detected by this warning in Clang r271374 are
@@ -205,7 +205,7 @@ func init() {
// Extra cflags for external third-party projects to disable warnings that // Extra cflags for external third-party projects to disable warnings that
// are infeasible to fix in all the external projects and their upstream repos. // are infeasible to fix in all the external projects and their upstream repos.
staticVariableExportedToBazel("ClangExtraExternalCflags", []string{ exportStringListStaticVariable("ClangExtraExternalCflags", []string{
"-Wno-enum-compare", "-Wno-enum-compare",
"-Wno-enum-compare-switch", "-Wno-enum-compare-switch",

View File

@@ -165,13 +165,13 @@ func init() {
commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=") commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=")
} }
staticVariableExportedToBazel("CommonGlobalConlyflags", commonGlobalConlyflags) exportStringListStaticVariable("CommonGlobalConlyflags", commonGlobalConlyflags)
staticVariableExportedToBazel("DeviceGlobalCppflags", deviceGlobalCppflags) exportStringListStaticVariable("DeviceGlobalCppflags", deviceGlobalCppflags)
staticVariableExportedToBazel("DeviceGlobalLdflags", deviceGlobalLdflags) exportStringListStaticVariable("DeviceGlobalLdflags", deviceGlobalLdflags)
staticVariableExportedToBazel("DeviceGlobalLldflags", deviceGlobalLldflags) exportStringListStaticVariable("DeviceGlobalLldflags", deviceGlobalLldflags)
staticVariableExportedToBazel("HostGlobalCppflags", hostGlobalCppflags) exportStringListStaticVariable("HostGlobalCppflags", hostGlobalCppflags)
staticVariableExportedToBazel("HostGlobalLdflags", hostGlobalLdflags) exportStringListStaticVariable("HostGlobalLdflags", hostGlobalLdflags)
staticVariableExportedToBazel("HostGlobalLldflags", hostGlobalLldflags) exportStringListStaticVariable("HostGlobalLldflags", hostGlobalLldflags)
// Export the static default CommonClangGlobalCflags to Bazel. // Export the static default CommonClangGlobalCflags to Bazel.
// TODO(187086342): handle cflags that are set in VariableFuncs. // TODO(187086342): handle cflags that are set in VariableFuncs.
@@ -183,7 +183,7 @@ func init() {
"-ftrivial-auto-var-init=zero", "-ftrivial-auto-var-init=zero",
"-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang", "-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang",
}...) }...)
exportedVars.Set("CommonClangGlobalCflags", variableValue(commonClangGlobalCFlags)) exportedStringListVars.Set("CommonClangGlobalCflags", commonClangGlobalCFlags)
pctx.VariableFunc("CommonClangGlobalCflags", func(ctx android.PackageVarContext) string { pctx.VariableFunc("CommonClangGlobalCflags", func(ctx android.PackageVarContext) string {
flags := ClangFilterUnknownCflags(commonGlobalCflags) flags := ClangFilterUnknownCflags(commonGlobalCflags)
@@ -208,7 +208,7 @@ func init() {
// Export the static default DeviceClangGlobalCflags to Bazel. // Export the static default DeviceClangGlobalCflags to Bazel.
// TODO(187086342): handle cflags that are set in VariableFuncs. // TODO(187086342): handle cflags that are set in VariableFuncs.
deviceClangGlobalCflags := append(ClangFilterUnknownCflags(deviceGlobalCflags), "${ClangExtraTargetCflags}") deviceClangGlobalCflags := append(ClangFilterUnknownCflags(deviceGlobalCflags), "${ClangExtraTargetCflags}")
exportedVars.Set("DeviceClangGlobalCflags", variableValue(deviceClangGlobalCflags)) exportedStringListVars.Set("DeviceClangGlobalCflags", deviceClangGlobalCflags)
pctx.VariableFunc("DeviceClangGlobalCflags", func(ctx android.PackageVarContext) string { pctx.VariableFunc("DeviceClangGlobalCflags", func(ctx android.PackageVarContext) string {
if ctx.Config().Fuchsia() { if ctx.Config().Fuchsia() {
@@ -218,10 +218,10 @@ func init() {
} }
}) })
staticVariableExportedToBazel("HostClangGlobalCflags", ClangFilterUnknownCflags(hostGlobalCflags)) exportStringListStaticVariable("HostClangGlobalCflags", ClangFilterUnknownCflags(hostGlobalCflags))
staticVariableExportedToBazel("NoOverrideClangGlobalCflags", append(ClangFilterUnknownCflags(noOverrideGlobalCflags), "${ClangExtraNoOverrideCflags}")) exportStringListStaticVariable("NoOverrideClangGlobalCflags", append(ClangFilterUnknownCflags(noOverrideGlobalCflags), "${ClangExtraNoOverrideCflags}"))
staticVariableExportedToBazel("CommonClangGlobalCppflags", append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}")) exportStringListStaticVariable("CommonClangGlobalCppflags", append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}"))
staticVariableExportedToBazel("ClangExternalCflags", []string{"${ClangExtraExternalCflags}"}) exportStringListStaticVariable("ClangExternalCflags", []string{"${ClangExtraExternalCflags}"})
// Everything in these lists is a crime against abstraction and dependency tracking. // Everything in these lists is a crime against abstraction and dependency tracking.
// Do not add anything to this list. // Do not add anything to this list.
@@ -236,7 +236,7 @@ func init() {
"frameworks/native/opengl/include", "frameworks/native/opengl/include",
"frameworks/av/include", "frameworks/av/include",
} }
exportedVars.Set("CommonGlobalIncludes", commonGlobalIncludes) exportedStringListVars.Set("CommonGlobalIncludes", commonGlobalIncludes)
pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I", commonGlobalIncludes) pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I", commonGlobalIncludes)
pctx.SourcePathVariable("ClangDefaultBase", ClangDefaultBase) pctx.SourcePathVariable("ClangDefaultBase", ClangDefaultBase)