OLD | NEW |
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. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 if [[ -n "${with_android}" ]] && ! [[ -d "${ANDROID_NDK_DIR}" ]]; then | 213 if [[ -n "${with_android}" ]] && ! [[ -d "${ANDROID_NDK_DIR}" ]]; then |
214 echo "Android NDK not found at ${ANDROID_NDK_DIR}" | 214 echo "Android NDK not found at ${ANDROID_NDK_DIR}" |
215 echo "The Android NDK is needed to build a Clang whose -fsanitize=address" | 215 echo "The Android NDK is needed to build a Clang whose -fsanitize=address" |
216 echo "works on Android. See " | 216 echo "works on Android. See " |
217 echo "http://code.google.com/p/chromium/wiki/AndroidBuildInstructions for how" | 217 echo "http://code.google.com/p/chromium/wiki/AndroidBuildInstructions for how" |
218 echo "to install the NDK, or pass --without-android." | 218 echo "to install the NDK, or pass --without-android." |
219 exit 1 | 219 exit 1 |
220 fi | 220 fi |
221 | 221 |
222 # Revert previous temporary patches. | |
223 if [[ -d "${COMPILER_RT_DIR}" ]]; then | |
224 pushd "${COMPILER_RT_DIR}" | |
225 svn revert lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | |
226 svn revert make/platform/clang_linux.mk | |
227 popd | |
228 fi | |
229 if [[ -d "${LLVM_DIR}" ]]; then | |
230 pushd "${LLVM_DIR}" | |
231 svn revert lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp | |
232 svn revert test/CodeGen/ARM/debug-frame-large-stack.ll | |
233 svn revert test/CodeGen/ARM/debug-frame-vararg.ll | |
234 svn revert test/CodeGen/ARM/debug-frame.ll | |
235 popd | |
236 fi | |
237 | |
238 echo Getting LLVM r"${CLANG_REVISION}" in "${LLVM_DIR}" | 222 echo Getting LLVM r"${CLANG_REVISION}" in "${LLVM_DIR}" |
239 if ! svn co --force "${LLVM_REPO_URL}/llvm/trunk@${CLANG_REVISION}" \ | 223 if ! svn co --force "${LLVM_REPO_URL}/llvm/trunk@${CLANG_REVISION}" \ |
240 "${LLVM_DIR}"; then | 224 "${LLVM_DIR}"; then |
241 echo Checkout failed, retrying | 225 echo Checkout failed, retrying |
242 rm -rf "${LLVM_DIR}" | 226 rm -rf "${LLVM_DIR}" |
243 svn co --force "${LLVM_REPO_URL}/llvm/trunk@${CLANG_REVISION}" "${LLVM_DIR}" | 227 svn co --force "${LLVM_REPO_URL}/llvm/trunk@${CLANG_REVISION}" "${LLVM_DIR}" |
244 fi | 228 fi |
245 | 229 |
246 echo Getting clang r"${CLANG_REVISION}" in "${CLANG_DIR}" | 230 echo Getting clang r"${CLANG_REVISION}" in "${CLANG_DIR}" |
247 svn co --force "${LLVM_REPO_URL}/cfe/trunk@${CLANG_REVISION}" "${CLANG_DIR}" | 231 svn co --force "${LLVM_REPO_URL}/cfe/trunk@${CLANG_REVISION}" "${CLANG_DIR}" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 "${TOOL_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" | 460 "${TOOL_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" |
477 fi | 461 fi |
478 done | 462 done |
479 pushd "${LLVM_BUILD_DIR}" | 463 pushd "${LLVM_BUILD_DIR}" |
480 ${MAKE} check-all | 464 ${MAKE} check-all |
481 popd | 465 popd |
482 fi | 466 fi |
483 | 467 |
484 # After everything is done, log success for this revision. | 468 # After everything is done, log success for this revision. |
485 echo "${CLANG_AND_PLUGINS_REVISION}" > "${STAMP_FILE}" | 469 echo "${CLANG_AND_PLUGINS_REVISION}" > "${STAMP_FILE}" |
OLD | NEW |