diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-03 01:55:25 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-03 01:55:25 +0000 |
commit | 875288e14668d9dcb7e883a0b263d9b5b546740a (patch) | |
tree | 5f094e9f819048615f0b70c3ddef6075b70ec00d | |
parent | 7e76cc3b7431084ac51762b1a7f63b80fe83e96f (diff) | |
download | chromium_src-875288e14668d9dcb7e883a0b263d9b5b546740a.zip chromium_src-875288e14668d9dcb7e883a0b263d9b5b546740a.tar.gz chromium_src-875288e14668d9dcb7e883a0b263d9b5b546740a.tar.bz2 |
Let `gclient runhooks` pull clang on mac.
If nothing needs to be done, the script takes 0s to run. If a new
version is available, it's downloaded from the web. It's a 13MB
download, which takes ~20s. This has to be paid ~once/week by all
mac devs, but since clang compiles faster than gcc this is actually
a big speed-up.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7835005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99507 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 7 | ||||
-rw-r--r-- | tools/clang/scripts/update.py | 17 |
2 files changed, 24 insertions, 0 deletions
@@ -420,6 +420,13 @@ hooks = [ ], }, { + # Pull clang on mac. If nothing changed, or on non-mac platforms, this takes + # zero seconds to run. If something changed, it downloads a prebuilt clang, + # which takes ~20s, but clang speeds up builds by more than 20s. + "pattern": ".", + "action": ["python", "src/tools/clang/scripts/update.py", "--mac-only"], + }, + { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", "action": ["python", "src/build/gyp_chromium"], diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py new file mode 100644 index 0000000..6fe0653 --- /dev/null +++ b/tools/clang/scripts/update.py @@ -0,0 +1,17 @@ +#!/usr/bin/python +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Windows can't run .sh files, so this is a small python wrapper around +# update.sh. + +import os +import subprocess +import sys + +if __name__ == '__main__': + if sys.platform in ['win32', 'cygwin']: + sys.exit(0) + subprocess.call( + [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:]) |