diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-11-08 18:31:47 -0500 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-11-08 18:31:47 -0500 |
commit | 33931a90dce458374dcff80e82dab7c7f9e9f370 (patch) | |
tree | 4422c65d028f5a0323eb9788fd4361cc063d3207 /coreconf/werror.py | |
parent | 7fe7fc11bd49e3a4f537f162fc7bdbe5df393990 (diff) | |
download | nss-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.py | 6 |
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', |