Resolve GccTriple/ClangTriple early.
When these are Ninja variable they can't be used in android.Path since
they'll be rejected as invalid paths. We don't actually need them to be
a Ninja variable, so make them plain old strings instead.
Test: Still builds.
Change-Id: I04743cebd4b2f9be5685545f2ee941df180fce14
diff --git a/cc/arm64_device.go b/cc/arm64_device.go
index 583da44..1dc0ecd 100644
--- a/cc/arm64_device.go
+++ b/cc/arm64_device.go
@@ -94,8 +94,6 @@
pctx.SourcePathVariable("arm64GccRoot",
"prebuilts/gcc/${HostPrebuiltTag}/aarch64/aarch64-linux-android-${arm64GccVersion}")
- pctx.StaticVariable("arm64GccTriple", "aarch64-linux-android")
-
pctx.StaticVariable("arm64Cflags", strings.Join(arm64Cflags, " "))
pctx.StaticVariable("arm64Ldflags", strings.Join(arm64Ldflags, " "))
pctx.StaticVariable("arm64Cppflags", strings.Join(arm64Cppflags, " "))
@@ -139,7 +137,7 @@
}
func (t *toolchainArm64) GccTriple() string {
- return "${arm64GccTriple}"
+ return "aarch64-linux-android"
}
func (t *toolchainArm64) GccVersion() string {
@@ -167,7 +165,7 @@
}
func (t *toolchainArm64) ClangTriple() string {
- return "${arm64GccTriple}"
+ return t.GccTriple()
}
func (t *toolchainArm64) ClangCflags() string {