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

Side by Side Diff: tools/clang/scripts/update.sh

Issue 9071010: NOT FOR SUBMISSION (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only one hack needed left! Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/string16.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script will check out llvm and clang into third_party/llvm and build it. 6 # This script will check out llvm and clang into third_party/llvm and build it.
7 7
8 # Do NOT CHANGE this if you don't know what you're doing -- see 8 # Do NOT CHANGE this if you don't know what you're doing -- see
9 # https://code.google.com/p/chromium/wiki/UpdatingClang 9 # https://code.google.com/p/chromium/wiki/UpdatingClang
10 # Reverting problematic clang rolls is safe, though. 10 # Reverting problematic clang rolls is safe, though.
11 CLANG_REVISION=147434 11 CLANG_REVISION=147524
12 12
13 THIS_DIR="$(dirname "${0}")" 13 THIS_DIR="$(dirname "${0}")"
14 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" 14 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm"
15 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build" 15 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build"
16 CLANG_DIR="${LLVM_DIR}/tools/clang" 16 CLANG_DIR="${LLVM_DIR}/tools/clang"
17 COMPILER_RT_DIR="${LLVM_DIR}/projects/compiler-rt" 17 COMPILER_RT_DIR="${LLVM_DIR}/projects/compiler-rt"
18 STAMP_FILE="${LLVM_BUILD_DIR}/cr_build_revision" 18 STAMP_FILE="${LLVM_BUILD_DIR}/cr_build_revision"
19 19
20 # ${A:-a} returns $A if it's set, a else. 20 # ${A:-a} returns $A if it's set, a else.
21 LLVM_REPO_URL=${LLVM_URL:-https://llvm.org/svn/llvm-project} 21 LLVM_REPO_URL=${LLVM_URL:-https://llvm.org/svn/llvm-project}
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 --without-llvmgcc \ 182 --without-llvmgcc \
183 --without-llvmgxx 183 --without-llvmgxx
184 fi 184 fi
185 185
186 NUM_JOBS=3 186 NUM_JOBS=3
187 if [ "${OS}" = "Linux" ]; then 187 if [ "${OS}" = "Linux" ]; then
188 NUM_JOBS="$(grep -c "^processor" /proc/cpuinfo)" 188 NUM_JOBS="$(grep -c "^processor" /proc/cpuinfo)"
189 elif [ "${OS}" = "Darwin" ]; then 189 elif [ "${OS}" = "Darwin" ]; then
190 NUM_JOBS="$(sysctl -n hw.ncpu)" 190 NUM_JOBS="$(sysctl -n hw.ncpu)"
191 fi 191 fi
192 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" 192 export PATH="/home/fischman/src/goma:$PATH"
193 MACOSX_DEPLOYMENT_TARGET=10.5 make -j500
193 cd - 194 cd -
194 195
195 # Build plugin. 196 # Build plugin.
196 # Copy it into the clang tree and use clang's build system to compile the 197 # Copy it into the clang tree and use clang's build system to compile the
197 # plugin. 198 # plugin.
198 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" 199 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins"
199 PLUGIN_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-plugin" 200 PLUGIN_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-plugin"
200 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin" 201 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin"
201 rm -rf "${PLUGIN_DST_DIR}" 202 rm -rf "${PLUGIN_DST_DIR}"
202 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}" 203 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}"
203 rm -rf "${PLUGIN_BUILD_DIR}" 204 rm -rf "${PLUGIN_BUILD_DIR}"
204 mkdir -p "${PLUGIN_BUILD_DIR}" 205 mkdir -p "${PLUGIN_BUILD_DIR}"
205 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" 206 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}"
206 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" 207 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}"
207 208
208 if [[ -n "$run_tests" ]]; then 209 if [[ -n "$run_tests" ]]; then
209 # Run a few tests. 210 # Run a few tests.
210 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" 211 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts"
211 cd "${LLVM_BUILD_DIR}" 212 cd "${LLVM_BUILD_DIR}"
212 make check-all 213 make check-all
213 cd - 214 cd -
214 fi 215 fi
215 216
216 # After everything is done, log success for this revision. 217 # After everything is done, log success for this revision.
217 echo "${CLANG_REVISION}" > "${STAMP_FILE}" 218 echo "${CLANG_REVISION}" > "${STAMP_FILE}"
OLDNEW
« no previous file with comments | « base/string16.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698