Bug 1386588 - Always print out the commands run by the clang build job. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 02 Aug 2017 21:42:26 +0900
changeset 619734 f838fe547c61d0009c7556e94677f06a491d87d8
parent 619733 49d45ae7a573f799025a23749581bc1270780e55
child 619735 b146b8ca8cd9703acbffa73f062a6780ecfb3796
push id71785
push userbmo:mh+mozilla@glandium.org
push dateWed, 02 Aug 2017 13:26:36 +0000
reviewersgps
bugs1386588
milestone56.0a1
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.
build/build-clang/build-clang.py
--- 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'])