From 34fc3b1e84f645009e3cb21be0161eaa53d6d0f4 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 7 Dec 2015 12:30:44 -0800 Subject: Expose real GccVersion In order to validate that the NDK STL paths exists, we need to know the full path, including the Gcc version during the go execution. So instead of returning a ninja variable reference, just return the contents of the variable. This also fixes a few invalid uses of armGccVersion to the proper variable. Change-Id: I54398ba4aa4000235b7d537a2c4efe3ecbbeec8b --- cc/arm_device.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cc/arm_device.go') diff --git a/cc/arm_device.go b/cc/arm_device.go index 2d6d38c5..ccfefba8 100644 --- a/cc/arm_device.go +++ b/cc/arm_device.go @@ -121,6 +121,10 @@ var ( armClangArchVariantCflags = copyVariantFlags(armArchVariantCflags) ) +const ( + armGccVersion = "4.9" +) + func copyVariantFlags(m map[string][]string) map[string][]string { ret := make(map[string][]string, len(m)) for k, v := range m { @@ -148,7 +152,7 @@ func init() { "-mfpu=neon-vfpv4", } - pctx.StaticVariable("armGccVersion", "4.9") + pctx.StaticVariable("armGccVersion", armGccVersion) pctx.StaticVariable("armGccRoot", "prebuilts/gcc/${HostPrebuiltTag}/arm/arm-linux-androideabi-${armGccVersion}") @@ -268,7 +272,7 @@ func (t *toolchainArm) GccTriple() string { } func (t *toolchainArm) GccVersion() string { - return "${armGccVersion}" + return armGccVersion } func (t *toolchainArm) ToolchainCflags() string { -- cgit v1.2.3