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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 esac | 149 esac |
150 shift | 150 shift |
151 done | 151 done |
152 | 152 |
153 if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then | 153 if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then |
154 force_local_build=yes | 154 force_local_build=yes |
155 | 155 |
156 # Skip local patches when using HEAD: they probably don't apply anymore. | 156 # Skip local patches when using HEAD: they probably don't apply anymore. |
157 with_patches= | 157 with_patches= |
158 | 158 |
| 159 if ! [[ "$GYP_DEFINES" =~ .*OS=android.* ]]; then |
| 160 # Only build the Android ASan rt when targetting Android. |
| 161 with_android= |
| 162 fi |
| 163 |
159 echo "LLVM_FORCE_HEAD_REVISION was set; using r${CLANG_REVISION}" | 164 echo "LLVM_FORCE_HEAD_REVISION was set; using r${CLANG_REVISION}" |
160 fi | 165 fi |
161 | 166 |
162 if [[ -n "$if_needed" ]]; then | 167 if [[ -n "$if_needed" ]]; then |
163 if [[ "${OS}" == "Darwin" ]]; then | 168 if [[ "${OS}" == "Darwin" ]]; then |
164 # clang is used on Mac. | 169 # clang is used on Mac. |
165 true | 170 true |
166 elif [[ "$GYP_DEFINES" =~ .*(clang|tsan|asan|lsan|msan)=1.* ]]; then | 171 elif [[ "$GYP_DEFINES" =~ .*(clang|tsan|asan|lsan|msan)=1.* ]]; then |
167 # clang requested via $GYP_DEFINES. | 172 # clang requested via $GYP_DEFINES. |
168 true | 173 true |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 964 |
960 if [[ -n "$run_tests" ]]; then | 965 if [[ -n "$run_tests" ]]; then |
961 # Run Chrome tool tests. | 966 # Run Chrome tool tests. |
962 ninja -C "${LLVM_BUILD_DIR}" cr-check-all | 967 ninja -C "${LLVM_BUILD_DIR}" cr-check-all |
963 # Run the LLVM and Clang tests. | 968 # Run the LLVM and Clang tests. |
964 ninja -C "${LLVM_BUILD_DIR}" check-all | 969 ninja -C "${LLVM_BUILD_DIR}" check-all |
965 fi | 970 fi |
966 | 971 |
967 # After everything is done, log success for this revision. | 972 # After everything is done, log success for this revision. |
968 echo "${CLANG_AND_PLUGINS_REVISION}" > "${STAMP_FILE}" | 973 echo "${CLANG_AND_PLUGINS_REVISION}" > "${STAMP_FILE}" |
OLD | NEW |