summaryrefslogtreecommitdiff
path: root/coreconf/werror.py
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2016-11-08 18:31:47 -0500
committerTed Mielczarek <ted@mielczarek.org>2016-11-08 18:31:47 -0500
commit33931a90dce458374dcff80e82dab7c7f9e9f370 (patch)
tree4422c65d028f5a0323eb9788fd4361cc063d3207 /coreconf/werror.py
parent7fe7fc11bd49e3a4f537f162fc7bdbe5df393990 (diff)
downloadnss-hg-33931a90dce458374dcff80e82dab7c7f9e9f370.tar.gz
bug 1316288 - Fix werror.py and check_cc_clang.py for cases where cc doesn't exist. r=franziskus
Diffstat (limited to 'coreconf/werror.py')
-rw-r--r--coreconf/werror.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/coreconf/werror.py b/coreconf/werror.py
index 0cd890373..a37fad95f 100644
--- a/coreconf/werror.py
+++ b/coreconf/werror.py
@@ -6,7 +6,11 @@ import subprocess
def main():
cc = os.environ.get('CC', 'cc')
sink = open(os.devnull, 'wb')
- cc_is_clang = 'clang' in subprocess.check_output([cc, '--version'], stderr=sink)
+ try:
+ cc_is_clang = 'clang' in subprocess.check_output([cc, '--version'], stderr=sink)
+ except OSError:
+ # We probably just don't have CC/cc.
+ return
def warning_supported(warning):
return subprocess.call([cc, '-x', 'c', '-E', '-Werror',