summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-03 20:09:43 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-03 20:09:43 +0000
commitd78457ce2895e5b98102412983a979f1896eca90 (patch)
tree8acd3666978b321d1b9b25325b513272e93dd8c5
parentbf9331ff06c2ede9414a4244712528abe9d9cad7 (diff)
downloadchromium_src-d78457ce2895e5b98102412983a979f1896eca90.zip
chromium_src-d78457ce2895e5b98102412983a979f1896eca90.tar.gz
chromium_src-d78457ce2895e5b98102412983a979f1896eca90.tar.bz2
Add a script that checks out / updates clang and builds it.
Clang and LLVM are checked out to third_party/llvm, the build results go in third_party/llvm-build BUG=none TEST=none Review URL: http://codereview.chromium.org/6334079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73652 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/clang/scripts/update.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
new file mode 100755
index 0000000..256b999
--- /dev/null
+++ b/tools/clang/scripts/update.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# 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.
+
+# This script will check out llvm and clang into third_party/llvm and build it.
+
+CLANG_REVISION=124227
+
+THIS_DIR=$(dirname $0)
+LLVM_DIR=$THIS_DIR/../../../third_party/llvm
+CLANG_DIR=$LLVM_DIR/tools/clang
+
+# Die if any command dies.
+set -e
+
+# 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 (in a separate directory).
+# The clang bots have /usr/local/clang be a symbolic link into this hardcoded
+# directory, so if you change it you also need to change these links.
+mkdir -p $LLVM_DIR/../llvm-build
+cd $LLVM_DIR/../llvm-build
+../llvm/configure --enable-optimized
+# TODO(thakis): Make this the number of cores (use |sysctl hw.ncpu| on OS X and
+# some grepping of /proc/cpuinfo on linux).
+make -j3
+cd -