diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-04-30 11:54:39 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-04-30 11:54:39 +0200 |
| commit | 3698959af9a7a34fa3fb3ddf999034a66f4e886f (patch) | |
| tree | b5a57c08a4f647d1bb3413171a4e31f1bd1a8e0d /sys | |
| parent | 2dd552a5420895f2fe6dcd3b57087cddb373cae9 (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.go | 2 |
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 } |
