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

Unified Diff: tools/clang/scripts/update.sh

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.sh
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index 2e0f0d0d78b702c6202fa4d438dea8f9ebf2c240..dac0c55ef43de5f525d87675e4b83713c4566f03 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -8,10 +8,10 @@
# Do NOT CHANGE this if you don't know what you're doing -- see
# https://code.google.com/p/chromium/wiki/UpdatingClang
# Reverting problematic clang rolls is safe, though.
-CLANG_REVISION=233105
+CLANG_REVISION=238013
# This is incremented when pushing a new build of Clang at the same revision.
-CLANG_SUB_REVISION=2
+CLANG_SUB_REVISION=3
PACKAGE_VERSION="${CLANG_REVISION}-${CLANG_SUB_REVISION}"
@@ -206,20 +206,17 @@ fi
if [[ -n "$if_needed" ]]; then
if [[ "${OS}" == "Darwin" ]]; then
- # clang is used on Mac.
+ # clang is always used on Mac.
+ true
+ elif [[ "${OS}" == "Linux" ]]; then
+ # clang is also aways used on Linux.
true
elif [[ "$GYP_DEFINES" =~ .*(clang|tsan|asan|lsan|msan)=1.* ]]; then
# clang requested via $GYP_DEFINES.
true
elif [[ -d "${LLVM_BUILD_DIR}" ]]; then
- # clang previously downloaded, remove third_party/llvm-build to prevent
- # updating.
- true
- elif [[ "${OS}" == "Linux" ]]; then
- # Temporarily use clang on linux. Leave a stamp file behind, so that
- # this script can remove clang again on machines where it was autoinstalled.
- mkdir -p "${LLVM_BUILD_DIR}"
- touch "${LLVM_BUILD_DIR}/autoinstall_stamp"
+ # clang previously downloaded, keep it up-to-date.
+ # If you don't want this, delete third_party/llvm-build on your machine.
true
else
# clang wasn't needed, not doing anything.
@@ -319,6 +316,8 @@ for i in \
"${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc" \
"${COMPILER_RT_DIR}/test/tsan/signal_segv_handler.cc" \
"${COMPILER_RT_DIR}/lib/sanitizer_common/sanitizer_coverage_libcdep.cc" \
+ "${COMPILER_RT_DIR}/cmake/config-ix.cmake" \
+ "${COMPILER_RT_DIR}/lib/ubsan/ubsan_platform.h" \
; do
if [[ -e "${i}" ]]; then
rm -f "${i}" # For unversioned files.
@@ -401,27 +400,6 @@ EOF
patch -p0
popd
- # Cherry-pick r234010 [sancov] Shrink pc array on Android back to 2**24."
- pushd "${COMPILER_RT_DIR}"
- cat << 'EOF' |
-diff --git a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
-index 4b976fc..cfd9e7e 100644
---- a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
-+++ b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
-@@ -109,7 +109,8 @@ class CoverageData {
-
- // Maximal size pc array may ever grow.
- // We MmapNoReserve this space to ensure that the array is contiguous.
-- static const uptr kPcArrayMaxSize = FIRST_32_SECOND_64(1 << 26, 1 << 27);
-+ static const uptr kPcArrayMaxSize =
-+ FIRST_32_SECOND_64(1 << (SANITIZER_ANDROID ? 24 : 26), 1 << 27);
- // The amount file mapping for the pc array is grown by.
- static const uptr kPcArrayMmapSize = 64 * 1024;
-
-EOF
- patch -p1
- popd
-
# This Go bindings test doesn't work after the bootstrap build on Linux. (PR21552)
pushd "${LLVM_DIR}"
cat << 'EOF' |
@@ -438,6 +416,37 @@ EOF
patch -p0
popd
+ # The UBSan run-time, which is now bundled with the ASan run-time, doesn't work
+ # on Mac OS X 10.8 (PR23539).
+ pushd "${COMPILER_RT_DIR}"
+ cat << 'EOF' |
+--- a/cmake/config-ix.cmake
++++ b/cmake/config-ix.cmake
+@@ -319,7 +319,7 @@ else()
+ endif()
+
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
+- OS_NAME MATCHES "Darwin|Linux|FreeBSD")
++ OS_NAME MATCHES "Linux|FreeBSD")
+ set(COMPILER_RT_HAS_UBSAN TRUE)
+ else()
+ set(COMPILER_RT_HAS_UBSAN FALSE)
+diff --git a/lib/ubsan/ubsan_platform.h b/lib/ubsan/ubsan_platform.h
+index 8ba253b..d5dce8d 100644
+--- a/lib/ubsan/ubsan_platform.h
++++ b/lib/ubsan/ubsan_platform.h
+@@ -14,7 +14,7 @@
+ #define UBSAN_PLATFORM_H
+
+ // Other platforms should be easy to add, and probably work as-is.
+-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \
++#if (defined(__linux__) || defined(__FreeBSD__)) && \
+ (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
+ defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__))
+ # define CAN_SANITIZE_UB 1
+EOF
+ patch -p1
+ popd
fi
@@ -666,10 +675,10 @@ popd
if [[ -n "${with_android}" ]]; then
# Make a standalone Android toolchain.
${ANDROID_NDK_DIR}/build/tools/make-standalone-toolchain.sh \
- --platform=android-14 \
+ --platform=android-19 \
--install-dir="${LLVM_BUILD_DIR}/android-toolchain" \
--system=linux-x86_64 \
- --stl=libcxx \
+ --stl=stlport \
--toolchain=arm-linux-androideabi-4.9
# Android NDK r9d copies a broken unwind.h into the toolchain, see
@@ -698,9 +707,11 @@ if [[ -n "${with_android}" ]]; then
popd
fi
-if [[ -n "$run_tests" ]]; then
+if [[ -n "$run_tests" || -n "${LLVM_FORCE_HEAD_REVISION:-''}" ]]; then
# Run Chrome tool tests.
ninja -C "${LLVM_BUILD_DIR}" cr-check-all
+fi
+if [[ -n "$run_tests" ]]; then
# Run the LLVM and Clang tests.
ninja -C "${LLVM_BUILD_DIR}" check-all
fi
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698