Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: tools/clang/scripts/update.sh

Issue 1169353002: update.py: Check out and build libc++ libc++abi on OS X, set deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« tools/clang/scripts/update.py ('K') | « tools/clang/scripts/update.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 fi 467 fi
468 468
469 CFLAGS="" 469 CFLAGS=""
470 CXXFLAGS="" 470 CXXFLAGS=""
471 LDFLAGS="" 471 LDFLAGS=""
472 472
473 # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is 473 # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is
474 # needed, on OS X it requires libc++. clang only automatically links to libc++ 474 # needed, on OS X it requires libc++. clang only automatically links to libc++
475 # when targeting OS X 10.9+, so add stdlib=libc++ explicitly so clang can run on 475 # when targeting OS X 10.9+, so add stdlib=libc++ explicitly so clang can run on
476 # OS X versions as old as 10.7. 476 # OS X versions as old as 10.7.
477 # TODO(thakis): Some bots are still on 10.6, so for now bundle libc++.dylib. 477 # TODO(thakis): Some bots are still on 10.6 (nacl...), so for now bundle
478 # Remove this once all bots are on 10.7+, then use --enable-libcpp=yes and 478 # libc++.dylib. Remove this once all bots are on 10.7+, then use
479 # change deployment_target to 10.7. 479 # -DLLVM_ENABLE_LIBCXX=ON and change deployment_target to 10.7.
480 deployment_target="" 480 deployment_target=""
481 481
482 if [ "${OS}" = "Darwin" ]; then 482 if [ "${OS}" = "Darwin" ]; then
483 # When building on 10.9, /usr/include usually doesn't exist, and while 483 # When building on 10.9, /usr/include usually doesn't exist, and while
484 # Xcode's clang automatically sets a sysroot, self-built clangs don't. 484 # Xcode's clang automatically sets a sysroot, self-built clangs don't.
485 CFLAGS="-isysroot $(xcrun --show-sdk-path)" 485 CFLAGS="-isysroot $(xcrun --show-sdk-path)"
486 CPPFLAGS="${CFLAGS}"
Nico 2015/06/09 23:30:34 This is apparently no longer needed. A local --boo
487 CXXFLAGS="-stdlib=libc++ -nostdinc++ -I${ABS_LIBCXX_DIR}/include ${CFLAGS}" 486 CXXFLAGS="-stdlib=libc++ -nostdinc++ -I${ABS_LIBCXX_DIR}/include ${CFLAGS}"
488 487
489 if [[ -n "${bootstrap}" ]]; then 488 if [[ -n "${bootstrap}" ]]; then
490 deployment_target=10.6 489 deployment_target=10.6
491 fi 490 fi
492 fi 491 fi
493 492
494 # Build bootstrap clang if requested. 493 # Build bootstrap clang if requested.
495 if [[ -n "${bootstrap}" ]]; then 494 if [[ -n "${bootstrap}" ]]; then
496 ABS_INSTALL_DIR="${PWD}/${LLVM_BOOTSTRAP_INSTALL_DIR}" 495 ABS_INSTALL_DIR="${PWD}/${LLVM_BOOTSTRAP_INSTALL_DIR}"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 # Run Chrome tool tests. 710 # Run Chrome tool tests.
712 ninja -C "${LLVM_BUILD_DIR}" cr-check-all 711 ninja -C "${LLVM_BUILD_DIR}" cr-check-all
713 fi 712 fi
714 if [[ -n "$run_tests" ]]; then 713 if [[ -n "$run_tests" ]]; then
715 # Run the LLVM and Clang tests. 714 # Run the LLVM and Clang tests.
716 ninja -C "${LLVM_BUILD_DIR}" check-all 715 ninja -C "${LLVM_BUILD_DIR}" check-all
717 fi 716 fi
718 717
719 # After everything is done, log success for this revision. 718 # After everything is done, log success for this revision.
720 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}" 719 echo "${PACKAGE_VERSION}" > "${STAMP_FILE}"
OLDNEW
« tools/clang/scripts/update.py ('K') | « tools/clang/scripts/update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698