| 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. |
| 11 CLANG_REVISION=233105 | 11 CLANG_REVISION=238013 |
| 12 | 12 |
| 13 # This is incremented when pushing a new build of Clang at the same revision. | 13 # This is incremented when pushing a new build of Clang at the same revision. |
| 14 CLANG_SUB_REVISION=2 | 14 CLANG_SUB_REVISION=1 |
| 15 | 15 |
| 16 PACKAGE_VERSION="${CLANG_REVISION}-${CLANG_SUB_REVISION}" | 16 PACKAGE_VERSION="${CLANG_REVISION}-${CLANG_SUB_REVISION}" |
| 17 | 17 |
| 18 THIS_DIR="$(dirname "${0}")" | 18 THIS_DIR="$(dirname "${0}")" |
| 19 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" | 19 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" |
| 20 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build/Release+Asserts" | 20 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build/Release+Asserts" |
| 21 COMPILER_RT_BUILD_DIR="${LLVM_DIR}/../llvm-build/compiler-rt" | 21 COMPILER_RT_BUILD_DIR="${LLVM_DIR}/../llvm-build/compiler-rt" |
| 22 LLVM_BOOTSTRAP_DIR="${LLVM_DIR}/../llvm-bootstrap" | 22 LLVM_BOOTSTRAP_DIR="${LLVM_DIR}/../llvm-bootstrap" |
| 23 LLVM_BOOTSTRAP_INSTALL_DIR="${LLVM_DIR}/../llvm-bootstrap-install" | 23 LLVM_BOOTSTRAP_INSTALL_DIR="${LLVM_DIR}/../llvm-bootstrap-install" |
| 24 CLANG_DIR="${LLVM_DIR}/tools/clang" | 24 CLANG_DIR="${LLVM_DIR}/tools/clang" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 "${LLVM_DIR}/test/Bindings/Go/go.test" \ | 312 "${LLVM_DIR}/test/Bindings/Go/go.test" \ |
| 313 "${CLANG_DIR}/lib/Parse/ParseExpr.cpp" \ | 313 "${CLANG_DIR}/lib/Parse/ParseExpr.cpp" \ |
| 314 "${CLANG_DIR}/lib/Parse/ParseTemplate.cpp" \ | 314 "${CLANG_DIR}/lib/Parse/ParseTemplate.cpp" \ |
| 315 "${CLANG_DIR}/lib/Sema/SemaDeclCXX.cpp" \ | 315 "${CLANG_DIR}/lib/Sema/SemaDeclCXX.cpp" \ |
| 316 "${CLANG_DIR}/lib/Sema/SemaExprCXX.cpp" \ | 316 "${CLANG_DIR}/lib/Sema/SemaExprCXX.cpp" \ |
| 317 "${CLANG_DIR}/test/SemaCXX/default2.cpp" \ | 317 "${CLANG_DIR}/test/SemaCXX/default2.cpp" \ |
| 318 "${CLANG_DIR}/test/SemaCXX/typo-correction-delayed.cpp" \ | 318 "${CLANG_DIR}/test/SemaCXX/typo-correction-delayed.cpp" \ |
| 319 "${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_stoptheworld_linux_libc
dep.cc" \ | 319 "${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_stoptheworld_linux_libc
dep.cc" \ |
| 320 "${COMPILER_RT_DIR}/test/tsan/signal_segv_handler.cc" \ | 320 "${COMPILER_RT_DIR}/test/tsan/signal_segv_handler.cc" \ |
| 321 "${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_coverage_libcdep.cc" \ | 321 "${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_coverage_libcdep.cc" \ |
| 322 "${COMPILER_RT_DIR}/cmake/config-ix.cmake" \ |
| 323 "${COMPILER_RT_DIR}/lib/ubsan/ubsan_platform.h" \ |
| 322 ; do | 324 ; do |
| 323 if [[ -e "${i}" ]]; then | 325 if [[ -e "${i}" ]]; then |
| 324 rm -f "${i}" # For unversioned files. | 326 rm -f "${i}" # For unversioned files. |
| 325 svn revert "${i}" | 327 svn revert "${i}" |
| 326 fi; | 328 fi; |
| 327 done | 329 done |
| 328 | 330 |
| 329 echo Remove the Clang tools shim dir | 331 echo Remove the Clang tools shim dir |
| 330 CHROME_TOOLS_SHIM_DIR=${ABS_LLVM_DIR}/tools/chrometools | 332 CHROME_TOOLS_SHIM_DIR=${ABS_LLVM_DIR}/tools/chrometools |
| 331 rm -rfv ${CHROME_TOOLS_SHIM_DIR} | 333 rm -rfv ${CHROME_TOOLS_SHIM_DIR} |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 396 |
| 395 -TEST_F(LibclangReparseTest, ReparseWithModule) { | 397 -TEST_F(LibclangReparseTest, ReparseWithModule) { |
| 396 +TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { | 398 +TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { |
| 397 const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; | 399 const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; |
| 398 const char *HeaderBottom = "\n};\n#endif\n"; | 400 const char *HeaderBottom = "\n};\n#endif\n"; |
| 399 const char *MFile = "#include \"HeaderFile.h\"\nint main() {" | 401 const char *MFile = "#include \"HeaderFile.h\"\nint main() {" |
| 400 EOF | 402 EOF |
| 401 patch -p0 | 403 patch -p0 |
| 402 popd | 404 popd |
| 403 | 405 |
| 404 # Cherry-pick r234010 [sancov] Shrink pc array on Android back to 2**24." | |
| 405 pushd "${COMPILER_RT_DIR}" | |
| 406 cat << 'EOF' | | |
| 407 diff --git a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/lib/sanitizer_
common/sanitizer_coverage_libcdep.cc | |
| 408 index 4b976fc..cfd9e7e 100644 | |
| 409 --- a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc | |
| 410 +++ b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc | |
| 411 @@ -109,7 +109,8 @@ class CoverageData { | |
| 412 | |
| 413 // Maximal size pc array may ever grow. | |
| 414 // We MmapNoReserve this space to ensure that the array is contiguous. | |
| 415 - static const uptr kPcArrayMaxSize = FIRST_32_SECOND_64(1 << 26, 1 << 27); | |
| 416 + static const uptr kPcArrayMaxSize = | |
| 417 + FIRST_32_SECOND_64(1 << (SANITIZER_ANDROID ? 24 : 26), 1 << 27); | |
| 418 // The amount file mapping for the pc array is grown by. | |
| 419 static const uptr kPcArrayMmapSize = 64 * 1024; | |
| 420 | |
| 421 EOF | |
| 422 patch -p1 | |
| 423 popd | |
| 424 | |
| 425 # This Go bindings test doesn't work after the bootstrap build on Linux. (PR21
552) | 406 # This Go bindings test doesn't work after the bootstrap build on Linux. (PR21
552) |
| 426 pushd "${LLVM_DIR}" | 407 pushd "${LLVM_DIR}" |
| 427 cat << 'EOF' | | 408 cat << 'EOF' | |
| 428 Index: test/Bindings/Go/go.test | 409 Index: test/Bindings/Go/go.test |
| 429 =================================================================== | 410 =================================================================== |
| 430 --- test/Bindings/Go/go.test (revision 223109) | 411 --- test/Bindings/Go/go.test (revision 223109) |
| 431 +++ test/Bindings/Go/go.test (working copy) | 412 +++ test/Bindings/Go/go.test (working copy) |
| 432 @@ -1,3 +1,3 @@ | 413 @@ -1,3 +1,3 @@ |
| 433 -; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm | 414 -; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm |
| 434 +; RUN: true | 415 +; RUN: true |
| 435 | 416 |
| 436 ; REQUIRES: shell | 417 ; REQUIRES: shell |
| 437 EOF | 418 EOF |
| 438 patch -p0 | 419 patch -p0 |
| 439 popd | 420 popd |
| 440 | 421 |
| 422 # The UBSan run-time, which is now bundled with the ASan run-time, doesn't wor
k |
| 423 # on Mac OS X 10.8 (PR23539). |
| 424 pushd "${COMPILER_RT_DIR}" |
| 425 cat << 'EOF' | |
| 426 --- a/cmake/config-ix.cmake |
| 427 +++ b/cmake/config-ix.cmake |
| 428 @@ -319,7 +319,7 @@ else() |
| 429 endif() |
| 430 |
| 431 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND |
| 432 - OS_NAME MATCHES "Darwin|Linux|FreeBSD") |
| 433 + OS_NAME MATCHES "Linux|FreeBSD") |
| 434 set(COMPILER_RT_HAS_UBSAN TRUE) |
| 435 else() |
| 436 set(COMPILER_RT_HAS_UBSAN FALSE) |
| 437 diff --git a/lib/ubsan/ubsan_platform.h b/lib/ubsan/ubsan_platform.h |
| 438 index 8ba253b..d5dce8d 100644 |
| 439 --- a/lib/ubsan/ubsan_platform.h |
| 440 +++ b/lib/ubsan/ubsan_platform.h |
| 441 @@ -14,7 +14,7 @@ |
| 442 #define UBSAN_PLATFORM_H |
| 443 |
| 444 // Other platforms should be easy to add, and probably work as-is. |
| 445 -#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \ |
| 446 +#if (defined(__linux__) || defined(__FreeBSD__)) && \ |
| 447 (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ |
| 448 defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__)) |
| 449 # define CAN_SANITIZE_UB 1 |
| 450 EOF |
| 451 patch -p1 |
| 452 popd |
| 441 | 453 |
| 442 fi | 454 fi |
| 443 | 455 |
| 444 # Echo all commands. | 456 # Echo all commands. |
| 445 set -x | 457 set -x |
| 446 | 458 |
| 447 # Set default values for CC and CXX if they're not set in the environment. | 459 # Set default values for CC and CXX if they're not set in the environment. |
| 448 CC=${CC:-cc} | 460 CC=${CC:-cc} |
| 449 CXX=${CXX:-c++} | 461 CXX=${CXX:-c++} |
| 450 | 462 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 # Run Chrome tool tests. | 714 # Run Chrome tool tests. |
| 703 ninja -C "${LLVM_BUILD_DIR}" cr-check-all | 715 ninja -C "${LLVM_BUILD_DIR}" cr-check-all |
| 704 fi | 716 fi |
| 705 if [[ -n "$run_tests" ]]; then | 717 if [[ -n "$run_tests" ]]; then |
| 706 # Run the LLVM and Clang tests. | 718 # Run the LLVM and Clang tests. |
| 707 ninja -C "${LLVM_BUILD_DIR}" check-all | 719 ninja -C "${LLVM_BUILD_DIR}" check-all |
| 708 fi | 720 fi |
| 709 | 721 |
| 710 # After everything is done, log success for this revision. | 722 # After everything is done, log success for this revision. |
| 711 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" | 723 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" |
| OLD | NEW |