aboutsummaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorZach Riggle <riggle@google.com>2018-10-08 17:57:53 -0500
committerDmitry Vyukov <dvyukov@google.com>2018-10-10 11:54:53 +0200
commitf37861df632a8e4c78cb3f174820eb915efb7ae2 (patch)
tree64e7bfb118392e9fdc74331a8cc30044cbe2efb5 /prog
parent8b311eafa7f32ebcae67cdf5e16aa1ab3fc77e7f (diff)
targets: Use OS=linux when GOOS=android
This avoids the issue of "android" not having any registered configurations or syscalls / ioctls / etc, when built with GOOS=android. This occurs when building in Google3, since --config=android_arm64 selects the Android toolchain.
Diffstat (limited to 'prog')
-rw-r--r--prog/target.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/prog/target.go b/prog/target.go
index 631b756e8..bff59ea4f 100644
--- a/prog/target.go
+++ b/prog/target.go
@@ -72,6 +72,9 @@ func RegisterTarget(target *Target, initArch func(target *Target)) {
}
func GetTarget(OS, arch string) (*Target, error) {
+ if OS == "android" {
+ OS = "linux"
+ }
key := OS + "/" + arch
target := targets[key]
if target == nil {