diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 21:08:21 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 21:08:21 +0000 |
commit | 001df3091dc02bcd0453b305dbc47195ac70fcfb (patch) | |
tree | 0833e549c1e6bc65b1e7482ac0c16fba969377f9 /tools | |
parent | cf21ad53d49316fde798c3dcce6ff319430bcfaf (diff) | |
download | chromium_src-001df3091dc02bcd0453b305dbc47195ac70fcfb.zip chromium_src-001df3091dc02bcd0453b305dbc47195ac70fcfb.tar.gz chromium_src-001df3091dc02bcd0453b305dbc47195ac70fcfb.tar.bz2 |
clang: Move clang_revision to DEPS
All bots still use tools/clang/scripts/update.sh to check out llvm/clang,
but with the revision number in DEPS, it's now possible to inject DEPS
entries on the bots. This has the advantage that bots can use our
read-only mirror of the llvm repo, and that release builders can
transparently check out clang from an upstream branch.
No intended functionality change.
BUG=91371
TEST=none
Review URL: http://codereview.chromium.org/7552011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/clang/scripts/update.sh | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh index 8d5a14b..3216be7 100755 --- a/tools/clang/scripts/update.sh +++ b/tools/clang/scripts/update.sh @@ -5,24 +5,40 @@ # This script will check out llvm and clang into third_party/llvm and build it. -CLANG_REVISION=136602 - THIS_DIR="$(dirname "${0}")" LLVM_DIR="${THIS_DIR}"/../../../third_party/llvm CLANG_DIR="${LLVM_DIR}"/tools/clang +DEPS_FILE="${THIS_DIR}"/../../../DEPS # Die if any command dies. set -e +# Since people need to run this script anyway to compile clang, let it check out +# clang as well if it's not in DEPS, so that people don't have to change their +# DEPS if they just want to give clang a try. +CLANG_REVISION=$(grep 'clang_revision":' "${DEPS_FILE}" | egrep -o [[:digit:]]+) + +if grep -q 'src/third_party/llvm":' "${DEPS_FILE}"; then + echo LLVM pulled in through DEPS, skipping LLVM update step +else + echo Getting LLVM r"${CLANG_REVISION}" in "${LLVM_DIR}" + svn co --force \ + http://llvm.org/svn/llvm-project/llvm/trunk@"${CLANG_REVISION}" \ + "${LLVM_DIR}" +fi + +if grep -q 'src/third_party/llvm/tools/clang":' "${DEPS_FILE}"; then + echo clang pulled in through DEPS, skipping clang update step +else + echo Getting clang r"${CLANG_REVISION}" in "${CLANG_DIR}" + svn co --force \ + http://llvm.org/svn/llvm-project/cfe/trunk@"${CLANG_REVISION}" \ + "${CLANG_DIR}" +fi + # Echo all commands. set -x -# Check out. -svn co --force http://llvm.org/svn/llvm-project/llvm/trunk@"${CLANG_REVISION}" \ - "${LLVM_DIR}" -svn co --force http://llvm.org/svn/llvm-project/cfe/trunk@"${CLANG_REVISION}" \ - "${CLANG_DIR}" - # Build clang (in a separate directory). # The clang bots have this path hardcoded in built/scripts/slave/compile.py, # so if you change it you also need to change these links. |