aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-11-07 06:41:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-07 11:06:56 +0100
commitb17cbe9d11b229e3fa944ddbe4aad061e254b77f (patch)
tree83715e3f3255d350bdf211f383b095ce37fd127d /sys
parent0281aea335f7b620aa396d75a7f2c5d14f2d0c70 (diff)
sys/targets: don't run flag tests on non-build OS
We should not try to do any builds for such targets anyway. And the compiler does not have to exist/work.
Diffstat (limited to 'sys')
-rw-r--r--sys/targets/targets.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index a30c2e769..e4266ec1b 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -456,6 +456,9 @@ func initTarget(target *Target, OS, arch string) {
}
func checkOptionalFlags(target *Target) {
+ if runtime.GOOS != target.BuildOS {
+ return
+ }
flags := make(map[string]*bool)
var wg sync.WaitGroup
for _, flag := range target.CrossCFlags {