Chromium Code Reviews| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 fi | 368 fi |
| 369 | 369 |
| 370 # Build ASan runtime for Android. | 370 # Build ASan runtime for Android. |
| 371 cd "${LLVM_BUILD_DIR}" | 371 cd "${LLVM_BUILD_DIR}" |
| 372 make -C tools/clang/runtime/ LLVM_ANDROID_TOOLCHAIN_DIR="../../../../${TC}" | 372 make -C tools/clang/runtime/ LLVM_ANDROID_TOOLCHAIN_DIR="../../../../${TC}" |
| 373 cd - | 373 cd - |
| 374 fi | 374 fi |
| 375 | 375 |
| 376 # Build Chrome-specific clang tools. Paths in this list should be relative to | 376 # Build Chrome-specific clang tools. Paths in this list should be relative to |
| 377 # tools/clang. | 377 # tools/clang. |
| 378 CHROME_TOOL_DIRS="plugins" | 378 CHROME_TOOL_DIRS="empty_string plugins" |
|
Nico
2013/03/27 16:35:29
Hm, this means that everyone building clang locall
dcheng
2013/03/28 00:10:17
I added (another) command-line argument instead, s
| |
| 379 # For each tool directory, copy it into the clang tree and use clang's build | 379 # For each tool directory, copy it into the clang tree and use clang's build |
| 380 # system to compile it. | 380 # system to compile it. |
| 381 for CHROME_TOOL_DIR in ${CHROME_TOOL_DIRS}; do | 381 for CHROME_TOOL_DIR in ${CHROME_TOOL_DIRS}; do |
| 382 TOOL_SRC_DIR="${THIS_DIR}/../${CHROME_TOOL_DIR}" | 382 TOOL_SRC_DIR="${THIS_DIR}/../${CHROME_TOOL_DIR}" |
| 383 TOOL_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}" | 383 TOOL_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}" |
| 384 TOOL_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}" | 384 TOOL_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}" |
| 385 rm -rf "${TOOL_DST_DIR}" | 385 rm -rf "${TOOL_DST_DIR}" |
| 386 cp -R "${TOOL_SRC_DIR}" "${TOOL_DST_DIR}" | 386 cp -R "${TOOL_SRC_DIR}" "${TOOL_DST_DIR}" |
| 387 rm -rf "${TOOL_BUILD_DIR}" | 387 rm -rf "${TOOL_BUILD_DIR}" |
| 388 mkdir -p "${TOOL_BUILD_DIR}" | 388 mkdir -p "${TOOL_BUILD_DIR}" |
| 389 cp "${TOOL_SRC_DIR}/Makefile" "${TOOL_BUILD_DIR}" | 389 cp "${TOOL_SRC_DIR}/Makefile" "${TOOL_BUILD_DIR}" |
| 390 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${TOOL_BUILD_DIR}" | 390 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${TOOL_BUILD_DIR}" |
| 391 done | 391 done |
| 392 | 392 |
| 393 if [[ -n "$run_tests" ]]; then | 393 if [[ -n "$run_tests" ]]; then |
| 394 # Run a few tests. | 394 # Run a few tests. |
| 395 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" | 395 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" |
| 396 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" | 396 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" |
| 397 cd "${LLVM_BUILD_DIR}" | 397 cd "${LLVM_BUILD_DIR}" |
| 398 make check-all | 398 make check-all |
| 399 cd - | 399 cd - |
| 400 fi | 400 fi |
| 401 | 401 |
| 402 # After everything is done, log success for this revision. | 402 # After everything is done, log success for this revision. |
| 403 echo "${CLANG_REVISION}" > "${STAMP_FILE}" | 403 echo "${CLANG_REVISION}" > "${STAMP_FILE}" |
| OLD | NEW |