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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 cp libcxxbuild/libc++.1.dylib bin/ | 577 cp libcxxbuild/libc++.1.dylib bin/ |
578 fi | 578 fi |
579 strip ${STRIP_FLAGS} bin/clang | 579 strip ${STRIP_FLAGS} bin/clang |
580 popd | 580 popd |
581 | 581 |
582 # Build compiler-rt out-of-tree. | 582 # Build compiler-rt out-of-tree. |
583 mkdir -p "${COMPILER_RT_BUILD_DIR}" | 583 mkdir -p "${COMPILER_RT_BUILD_DIR}" |
584 pushd "${COMPILER_RT_BUILD_DIR}" | 584 pushd "${COMPILER_RT_BUILD_DIR}" |
585 | 585 |
586 rm -fv CMakeCache.txt | 586 rm -fv CMakeCache.txt |
587 MACOSX_DEPLOYMENT_TARGET=${deployment_target} cmake -GNinja \ | 587 MACOSX_DEPLOYMENT_TARGET=${deployment_target} CC="" CXX="" cmake -GNinja \ |
588 -DCMAKE_BUILD_TYPE=Release \ | 588 -DCMAKE_BUILD_TYPE=Release \ |
589 -DLLVM_ENABLE_ASSERTIONS=ON \ | 589 -DLLVM_ENABLE_ASSERTIONS=ON \ |
590 -DLLVM_ENABLE_THREADS=OFF \ | 590 -DLLVM_ENABLE_THREADS=OFF \ |
591 -DCMAKE_C_COMPILER="${CC}" \ | 591 -DCMAKE_C_COMPILER="${ABS_LLVM_BUILD_DIR}/bin/clang" \ |
592 -DCMAKE_CXX_COMPILER="${CXX}" \ | 592 -DCMAKE_CXX_COMPILER="${ABS_LLVM_BUILD_DIR}/bin/clang++" \ |
593 -DSANITIZER_MIN_OSX_VERSION="10.7" \ | 593 -DSANITIZER_MIN_OSX_VERSION="10.7" \ |
594 -DLLVM_CONFIG_PATH="${ABS_LLVM_BUILD_DIR}/bin/llvm-config" \ | 594 -DLLVM_CONFIG_PATH="${ABS_LLVM_BUILD_DIR}/bin/llvm-config" \ |
595 "${ABS_COMPILER_RT_DIR}" | 595 "${ABS_COMPILER_RT_DIR}" |
596 | 596 |
597 ninja | 597 ninja |
598 | 598 |
599 # Copy selected output to the main tree. | 599 # Copy selected output to the main tree. |
600 # Darwin doesn't support cp --parents, so pipe through tar instead. | 600 # Darwin doesn't support cp --parents, so pipe through tar instead. |
601 CLANG_VERSION=$("${ABS_LLVM_BUILD_DIR}/bin/clang" --version | \ | 601 CLANG_VERSION=$("${ABS_LLVM_BUILD_DIR}/bin/clang" --version | \ |
602 sed -ne 's/clang version \([0-9]\.[0-9]\.[0-9]\).*/\1/p') | 602 sed -ne 's/clang version \([0-9]\.[0-9]\.[0-9]\).*/\1/p') |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 # Run Chrome tool tests. | 660 # Run Chrome tool tests. |
661 ninja -C "${LLVM_BUILD_DIR}" cr-check-all | 661 ninja -C "${LLVM_BUILD_DIR}" cr-check-all |
662 fi | 662 fi |
663 if [[ -n "$run_tests" ]]; then | 663 if [[ -n "$run_tests" ]]; then |
664 # Run the LLVM and Clang tests. | 664 # Run the LLVM and Clang tests. |
665 ninja -C "${LLVM_BUILD_DIR}" check-all | 665 ninja -C "${LLVM_BUILD_DIR}" check-all |
666 fi | 666 fi |
667 | 667 |
668 # After everything is done, log success for this revision. | 668 # After everything is done, log success for this revision. |
669 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" | 669 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" |
OLD | NEW |