| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]]; then | 44 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]]; then |
| 45 exit 0 | 45 exit 0 |
| 46 fi | 46 fi |
| 47 | 47 |
| 48 # TODO(thakis): Remove this after Sept 29 2011. http://crbug.com/96722 | 48 # TODO(thakis): Remove this after Sept 29 2011. http://crbug.com/96722 |
| 49 for rev in 138188 138417 139029 139473 139990; do | 49 for rev in 138188 138417 139029 139473 139990; do |
| 50 rm -f clang-$rev.tgz | 50 rm -f clang-$rev.tgz |
| 51 rm -rf clang-$rev | 51 rm -rf clang-$rev |
| 52 done | 52 done |
| 53 | 53 |
| 54 # TODO(thakis): Remove this after Sept 29 2011. http://crbug.com/96722 | |
| 55 for rev in 138188 138417 139029 139473 139990; do | |
| 56 rm -f clang-$rev.tgz | |
| 57 rm -rf clang-$rev | |
| 58 done | |
| 59 | |
| 60 # Xcode and clang don't get along when predictive compilation is enabled. | 54 # Xcode and clang don't get along when predictive compilation is enabled. |
| 61 # http://crbug.com/96315 | 55 # http://crbug.com/96315 |
| 62 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then | 56 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then |
| 63 XCONF=com.apple.Xcode | 57 XCONF=com.apple.Xcode |
| 64 if [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then | 58 if [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then |
| 65 echo | 59 echo |
| 66 echo " HEARKEN!" | 60 echo " HEARKEN!" |
| 67 echo "You're using Xcode3 and you have 'Predictive Compilation' enabled." | 61 echo "You're using Xcode3 and you have 'Predictive Compilation' enabled." |
| 68 echo "This does not work well with clang (http://crbug.com/96315)." | 62 echo "This does not work well with clang (http://crbug.com/96315)." |
| 69 echo "Disable it in Preferences->Building (lower right), or run" | 63 echo "Disable it in Preferences->Building (lower right), or run" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin" | 192 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin" |
| 199 rm -rf "${PLUGIN_DST_DIR}" | 193 rm -rf "${PLUGIN_DST_DIR}" |
| 200 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}" | 194 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}" |
| 201 rm -rf "${PLUGIN_BUILD_DIR}" | 195 rm -rf "${PLUGIN_BUILD_DIR}" |
| 202 mkdir -p "${PLUGIN_BUILD_DIR}" | 196 mkdir -p "${PLUGIN_BUILD_DIR}" |
| 203 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" | 197 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" |
| 204 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" | 198 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" |
| 205 | 199 |
| 206 # After everything is done, log success for this revision. | 200 # After everything is done, log success for this revision. |
| 207 echo "${CLANG_REVISION}" > "${STAMP_FILE}" | 201 echo "${CLANG_REVISION}" > "${STAMP_FILE}" |
| OLD | NEW |