Bug 1386588 - Always print out the commands run by the clang build job. r?gps
Not doing so makes debugging harder, for no added value.
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -13,46 +13,39 @@ import argparse
import tempfile
import glob
import errno
import re
from contextlib import contextmanager
import sys
import which
-DEBUG = os.getenv("DEBUG")
-
def symlink(source, link_name):
os_symlink = getattr(os, "symlink", None)
if callable(os_symlink):
os_symlink(source, link_name)
else:
if os.path.isdir(source):
# Fall back to copying the directory :(
copy_dir_contents(source, link_name)
def check_run(args):
- global DEBUG
- if DEBUG:
- print >> sys.stderr, ' '.join(args)
+ print >> sys.stderr, ' '.join(args)
r = subprocess.call(args)
assert r == 0
def run_in(path, args):
d = os.getcwd()
- global DEBUG
- if DEBUG:
- print >> sys.stderr, 'cd "%s"' % path
+ print >> sys.stderr, 'cd "%s"' % path
os.chdir(path)
check_run(args)
- if DEBUG:
- print >> sys.stderr, 'cd "%s"' % d
+ print >> sys.stderr, 'cd "%s"' % d
os.chdir(d)
def patch(patch, srcdir):
patch = os.path.realpath(patch)
check_run(['patch', '-d', srcdir, '-p1', '-i', patch, '--fuzz=0',
'-s'])