| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 THIS_DIR="$(dirname "${0}")" | 8 THIS_DIR="$(dirname "${0}")" |
| 9 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" | 9 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" |
| 10 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build" | 10 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 exit 1 | 47 exit 1 |
| 48 ;; | 48 ;; |
| 49 esac | 49 esac |
| 50 shift | 50 shift |
| 51 done | 51 done |
| 52 | 52 |
| 53 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]]; then | 53 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]]; then |
| 54 exit 0 | 54 exit 0 |
| 55 fi | 55 fi |
| 56 | 56 |
| 57 # TODO(thakis): Remove this after Sept 29 2011. http://crbug.com/96722 | |
| 58 for rev in 138188 138417 139029 139473 139990; do | |
| 59 rm -f clang-$rev.tgz | |
| 60 rm -rf clang-$rev | |
| 61 done | |
| 62 | |
| 63 # Xcode and clang don't get along when predictive compilation is enabled. | 57 # Xcode and clang don't get along when predictive compilation is enabled. |
| 64 # http://crbug.com/96315 | 58 # http://crbug.com/96315 |
| 65 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then | 59 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then |
| 66 XCONF=com.apple.Xcode | 60 XCONF=com.apple.Xcode |
| 67 if [[ "${GYP_GENERATORS}" != "make" ]] && \ | 61 if [[ "${GYP_GENERATORS}" != "make" ]] && \ |
| 68 [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then | 62 [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then |
| 69 echo | 63 echo |
| 70 echo " HEARKEN!" | 64 echo " HEARKEN!" |
| 71 echo "You're using Xcode3 and you have 'Predictive Compilation' enabled." | 65 echo "You're using Xcode3 and you have 'Predictive Compilation' enabled." |
| 72 echo "This does not work well with clang (http://crbug.com/96315)." | 66 echo "This does not work well with clang (http://crbug.com/96315)." |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 if [[ -n "$run_tests" ]]; then | 211 if [[ -n "$run_tests" ]]; then |
| 218 # Run a few tests. | 212 # Run a few tests. |
| 219 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" | 213 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" |
| 220 cd "${LLVM_BUILD_DIR}" | 214 cd "${LLVM_BUILD_DIR}" |
| 221 make check-all | 215 make check-all |
| 222 cd - | 216 cd - |
| 223 fi | 217 fi |
| 224 | 218 |
| 225 # After everything is done, log success for this revision. | 219 # After everything is done, log success for this revision. |
| 226 echo "${CLANG_REVISION}" > "${STAMP_FILE}" | 220 echo "${CLANG_REVISION}" > "${STAMP_FILE}" |
| OLD | NEW |