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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 # Clobber build files. PCH files only work with the compiler that created them. | 134 # Clobber build files. PCH files only work with the compiler that created them. |
135 # We delete .o files to make sure all files are built with the new compiler. | 135 # We delete .o files to make sure all files are built with the new compiler. |
136 echo "Clobbering build files" | 136 echo "Clobbering build files" |
137 MAKE_DIR="${THIS_DIR}/../../../out" | 137 MAKE_DIR="${THIS_DIR}/../../../out" |
138 XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild" | 138 XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild" |
139 for DIR in "${XCODEBUILD_DIR}" "${MAKE_DIR}/Debug" "${MAKE_DIR}/Release"; do | 139 for DIR in "${XCODEBUILD_DIR}" "${MAKE_DIR}/Debug" "${MAKE_DIR}/Release"; do |
140 if [[ -d "${DIR}" ]]; then | 140 if [[ -d "${DIR}" ]]; then |
141 find "${DIR}" -name '*.o' -exec rm {} + | 141 find "${DIR}" -name '*.o' -exec rm {} + |
142 find "${DIR}" -name '*.o.d' -exec rm {} + | 142 find "${DIR}" -name '*.o.d' -exec rm {} + |
143 find "${DIR}" -name '*.gch' -exec rm {} + | 143 find "${DIR}" -name '*.gch' -exec rm {} + |
144 find "${DIR}" -name '*.dylib' -exec rm {} + | 144 find "${DIR}" -name '*.dylib' -exec rm -rf {} + |
145 find "${DIR}" -name 'SharedPrecompiledHeaders' -exec rm -rf {} + | 145 find "${DIR}" -name 'SharedPrecompiledHeaders' -exec rm -rf {} + |
146 fi | 146 fi |
147 done | 147 done |
148 | 148 |
149 # Clobber NaCl toolchain stamp files, see http://crbug.com/159793 | 149 # Clobber NaCl toolchain stamp files, see http://crbug.com/159793 |
150 if [[ -d "${MAKE_DIR}" ]]; then | 150 if [[ -d "${MAKE_DIR}" ]]; then |
151 find "${MAKE_DIR}" -name 'stamp.untar' -exec rm {} + | 151 find "${MAKE_DIR}" -name 'stamp.untar' -exec rm {} + |
152 fi | 152 fi |
153 if [[ "${OS}" = "Darwin" ]]; then | 153 if [[ "${OS}" = "Darwin" ]]; then |
154 if [[ -d "${XCODEBUILD_DIR}" ]]; then | 154 if [[ -d "${XCODEBUILD_DIR}" ]]; then |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 # Run a few tests. | 313 # Run a few tests. |
314 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" | 314 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" |
315 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" | 315 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" |
316 cd "${LLVM_BUILD_DIR}" | 316 cd "${LLVM_BUILD_DIR}" |
317 make check-all | 317 make check-all |
318 cd - | 318 cd - |
319 fi | 319 fi |
320 | 320 |
321 # After everything is done, log success for this revision. | 321 # After everything is done, log success for this revision. |
322 echo "${CLANG_REVISION}" > "${STAMP_FILE}" | 322 echo "${CLANG_REVISION}" > "${STAMP_FILE}" |
| 323 |
OLD | NEW |