| 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=237739 | 11 CLANG_REVISION=233105 |
| 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=1 | 14 CLANG_SUB_REVISION=2 |
| 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" \ | |
| 324 ; do | 322 ; do |
| 325 if [[ -e "${i}" ]]; then | 323 if [[ -e "${i}" ]]; then |
| 326 rm -f "${i}" # For unversioned files. | 324 rm -f "${i}" # For unversioned files. |
| 327 svn revert "${i}" | 325 svn revert "${i}" |
| 328 fi; | 326 fi; |
| 329 done | 327 done |
| 330 | 328 |
| 331 echo Remove the Clang tools shim dir | 329 echo Remove the Clang tools shim dir |
| 332 CHROME_TOOLS_SHIM_DIR=${ABS_LLVM_DIR}/tools/chrometools | 330 CHROME_TOOLS_SHIM_DIR=${ABS_LLVM_DIR}/tools/chrometools |
| 333 rm -rfv ${CHROME_TOOLS_SHIM_DIR} | 331 rm -rfv ${CHROME_TOOLS_SHIM_DIR} |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 394 |
| 397 -TEST_F(LibclangReparseTest, ReparseWithModule) { | 395 -TEST_F(LibclangReparseTest, ReparseWithModule) { |
| 398 +TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { | 396 +TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) { |
| 399 const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; | 397 const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;"; |
| 400 const char *HeaderBottom = "\n};\n#endif\n"; | 398 const char *HeaderBottom = "\n};\n#endif\n"; |
| 401 const char *MFile = "#include \"HeaderFile.h\"\nint main() {" | 399 const char *MFile = "#include \"HeaderFile.h\"\nint main() {" |
| 402 EOF | 400 EOF |
| 403 patch -p0 | 401 patch -p0 |
| 404 popd | 402 popd |
| 405 | 403 |
| 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 |
| 406 # This Go bindings test doesn't work after the bootstrap build on Linux. (PR21
552) | 425 # This Go bindings test doesn't work after the bootstrap build on Linux. (PR21
552) |
| 407 pushd "${LLVM_DIR}" | 426 pushd "${LLVM_DIR}" |
| 408 cat << 'EOF' | | 427 cat << 'EOF' | |
| 409 Index: test/Bindings/Go/go.test | 428 Index: test/Bindings/Go/go.test |
| 410 =================================================================== | 429 =================================================================== |
| 411 --- test/Bindings/Go/go.test (revision 223109) | 430 --- test/Bindings/Go/go.test (revision 223109) |
| 412 +++ test/Bindings/Go/go.test (working copy) | 431 +++ test/Bindings/Go/go.test (working copy) |
| 413 @@ -1,3 +1,3 @@ | 432 @@ -1,3 +1,3 @@ |
| 414 -; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm | 433 -; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm |
| 415 +; RUN: true | 434 +; RUN: true |
| 416 | 435 |
| 417 ; REQUIRES: shell | 436 ; REQUIRES: shell |
| 418 EOF | 437 EOF |
| 419 patch -p0 | 438 patch -p0 |
| 420 popd | 439 popd |
| 421 | 440 |
| 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 | |
| 453 | 441 |
| 454 fi | 442 fi |
| 455 | 443 |
| 456 # Echo all commands. | 444 # Echo all commands. |
| 457 set -x | 445 set -x |
| 458 | 446 |
| 459 # Set default values for CC and CXX if they're not set in the environment. | 447 # Set default values for CC and CXX if they're not set in the environment. |
| 460 CC=${CC:-cc} | 448 CC=${CC:-cc} |
| 461 CXX=${CXX:-c++} | 449 CXX=${CXX:-c++} |
| 462 | 450 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 # Run Chrome tool tests. | 702 # Run Chrome tool tests. |
| 715 ninja -C "${LLVM_BUILD_DIR}" cr-check-all | 703 ninja -C "${LLVM_BUILD_DIR}" cr-check-all |
| 716 fi | 704 fi |
| 717 if [[ -n "$run_tests" ]]; then | 705 if [[ -n "$run_tests" ]]; then |
| 718 # Run the LLVM and Clang tests. | 706 # Run the LLVM and Clang tests. |
| 719 ninja -C "${LLVM_BUILD_DIR}" check-all | 707 ninja -C "${LLVM_BUILD_DIR}" check-all |
| 720 fi | 708 fi |
| 721 | 709 |
| 722 # After everything is done, log success for this revision. | 710 # After everything is done, log success for this revision. |
| 723 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" | 711 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" |
| OLD | NEW |