From f37861df632a8e4c78cb3f174820eb915efb7ae2 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Mon, 8 Oct 2018 17:57:53 -0500 Subject: 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. --- sys/targets/targets.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/targets/targets.go b/sys/targets/targets.go index 98a2fa9d0..24fcd5392 100644 --- a/sys/targets/targets.go +++ b/sys/targets/targets.go @@ -302,8 +302,12 @@ func init() { initTarget(target, OS, arch) } } + goos := runtime.GOOS + if goos == "android" { + goos = "linux" + } for _, target := range List["test"] { - target.CCompiler = List[runtime.GOOS][runtime.GOARCH].CCompiler + target.CCompiler = List[goos][runtime.GOARCH].CCompiler } } -- cgit mrf-deployment