Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: tools/clang/scripts/update.py

Issue 1127233002: Use Clang's update.py --print-revision everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No need to clobber the build dir in update.py anymore Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« build/common.gypi ('K') | « tools/clang/scripts/posix-print-revision.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 06d241e80b8e77f01e33bffe034641304a7f348a..b92bfac37202cba2ef277024aff70b588d4cee39 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -84,15 +84,6 @@ def RmTree(dir):
shutil.rmtree(dir, onerror=ChmodAndRetry)
-def ClobberChromiumBuildFiles():
- """Clobber Chomium build files."""
- print 'Clobbering Chromium build files...'
- out_dir = os.path.join(CHROMIUM_DIR, 'out')
- if os.path.isdir(out_dir):
- RmTree(out_dir)
- print 'Removed Chromium out dir: %s.' % (out_dir)
-
-
def RunCommand(command, fail_hard=True):
"""Run command and return success (True) or failure; or if fail_hard is
True, exit on failure."""
@@ -225,9 +216,6 @@ def UpdateClang(args):
return 0
AddCMakeToPath()
- if args.clobber:
- ClobberChromiumBuildFiles()
-
# Reset the stamp file in case the build is unsuccessful.
WriteStampFile('')
@@ -308,12 +296,15 @@ def main():
# dup()ed sys.stdin is writable, try
# fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi')
# TODO: Fix gclient instead, http://crbug.com/95350
+ try:
+ stderr = os.fdopen(os.dup(sys.stdin.fileno()))
+ except:
+ stderr = sys.stderr
return subprocess.call(
- [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:],
- stderr=os.fdopen(os.dup(sys.stdin.fileno())))
+ [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:],
+ stderr=stderr)
parser = argparse.ArgumentParser(description='Build Clang.')
- parser.add_argument('--no-clobber', dest='clobber', action='store_false')
parser.add_argument('--tools', nargs='*', default=['plugins'])
# For now, this flag is only used for the non-Windows flow, but argparser gets
# mad if it sees a flag it doesn't recognize.
« build/common.gypi ('K') | « tools/clang/scripts/posix-print-revision.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698