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

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

Issue 8429020: clang: Let `gclient sync` autoupdate clang on linux if clang has been downloaded before. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 THIS_DIR="$(dirname "${0}")" 8 THIS_DIR="$(dirname "${0}")"
9 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" 9 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm"
10 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build" 10 LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build"
(...skipping 24 matching lines...) Expand all
35 ;; 35 ;;
36 --mac-only) 36 --mac-only)
37 mac_only=yes 37 mac_only=yes
38 ;; 38 ;;
39 --run-tests) 39 --run-tests)
40 run_tests=yes 40 run_tests=yes
41 ;; 41 ;;
42 --help) 42 --help)
43 echo "usage: $0 [--force-local-build] [--mac-only] [--run-tests] " 43 echo "usage: $0 [--force-local-build] [--mac-only] [--run-tests] "
44 echo "--force-local-build: Don't try to download prebuilt binaries." 44 echo "--force-local-build: Don't try to download prebuilt binaries."
45 echo "--mac-only: Do nothing on non-Mac systems." 45 echo "--mac-only: Do initial download only on Mac systems."
46 echo "--run-tests: Run tests after building. Only for local builds." 46 echo "--run-tests: Run tests after building. Only for local builds."
47 exit 1 47 exit 1
48 ;; 48 ;;
49 esac 49 esac
50 shift 50 shift
51 done 51 done
52 52
53 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]]; then 53 # --mac-only prevents the initial download on non-mac systems, but if clang has
54 # already been downloaded in the past, this script keeps it up to date even if
55 # --mac-only is passed in and the system isn't a mac. People who don't like this
56 # can just delete their third_party/llvm-build directory.
57 if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]] &&
58 ! [[ -d "${LLVM_BUILD_DIR}" ]]; then
54 exit 0 59 exit 0
55 fi 60 fi
56 61
57 # Xcode and clang don't get along when predictive compilation is enabled. 62 # Xcode and clang don't get along when predictive compilation is enabled.
58 # http://crbug.com/96315 63 # http://crbug.com/96315
59 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then 64 if [[ "${OS}" = "Darwin" ]] && xcodebuild -version | grep -q 'Xcode 3.2' ; then
60 XCONF=com.apple.Xcode 65 XCONF=com.apple.Xcode
61 if [[ "${GYP_GENERATORS}" != "make" ]] && \ 66 if [[ "${GYP_GENERATORS}" != "make" ]] && \
62 [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then 67 [ "$(defaults read "${XCONF}" EnablePredictiveCompilation)" != "0" ]; then
63 echo 68 echo
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if [[ -n "$run_tests" ]]; then 216 if [[ -n "$run_tests" ]]; then
212 # Run a few tests. 217 # Run a few tests.
213 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" 218 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts"
214 cd "${LLVM_BUILD_DIR}" 219 cd "${LLVM_BUILD_DIR}"
215 make check-all 220 make check-all
216 cd - 221 cd -
217 fi 222 fi
218 223
219 # After everything is done, log success for this revision. 224 # After everything is done, log success for this revision.
220 echo "${CLANG_REVISION}" > "${STAMP_FILE}" 225 echo "${CLANG_REVISION}" > "${STAMP_FILE}"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698