Work around Clang driver segfault when --coverage is used with -c and /dev/null

llvm-svn: 284225
This commit is contained in:
Eric Fiselier 2016-10-14 10:30:33 +00:00
parent 67624af0cc
commit 68696836d1
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class CXXCompiler(object):
# Add -Werror to ensure that an unrecognized flag causes a non-zero
# exit code. -Werror is supported on all known compiler types.
if self.type is not None:
flags += ['-Werror']
flags += ['-Werror', '-fsyntax-only']
cmd, out, err, rc = self.compile(os.devnull, out=os.devnull,
flags=flags)
return rc == 0