aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-04-30 11:54:39 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-04-30 11:54:39 +0200
commit3698959af9a7a34fa3fb3ddf999034a66f4e886f (patch)
treeb5a57c08a4f647d1bb3413171a4e31f1bd1a8e0d /sys
parent2dd552a5420895f2fe6dcd3b57087cddb373cae9 (diff)
sys/targets: fix detection of optional compiler flags
The test source is now C++, so use -x c++. Stupid bug, but testing this is not trivial in the context where we specifically make behavior "flexible"...
Diffstat (limited to 'sys')
-rw-r--r--sys/targets/targets.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 73022ff6f..2ef575847 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -542,7 +542,7 @@ func (target *Target) lazyInit() {
}
func checkFlagSupported(target *Target, flag string) bool {
- cmd := exec.Command(target.CCompiler, "-x", "c", "-", "-o", "/dev/null", flag)
+ cmd := exec.Command(target.CCompiler, "-x", "c++", "-", "-o", "/dev/null", flag)
cmd.Stdin = strings.NewReader(simpleProg)
return cmd.Run() == nil
}