| Index: tools/clang/scripts/update.sh
 | 
| diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
 | 
| index 10a46453221c46630e96be4cb96ff1ba843839db..f0dbeb04e3d4f183d7db6dfb51b4b141d6c11be0 100755
 | 
| --- a/tools/clang/scripts/update.sh
 | 
| +++ b/tools/clang/scripts/update.sh
 | 
| @@ -11,7 +11,7 @@
 | 
|  CLANG_REVISION=233105
 | 
|  
 | 
|  # This is incremented when pushing a new build of Clang at the same revision.
 | 
| -CLANG_SUB_REVISION=1
 | 
| +CLANG_SUB_REVISION=2
 | 
|  
 | 
|  PACKAGE_VERSION="${CLANG_REVISION}-${CLANG_SUB_REVISION}"
 | 
|  
 | 
| @@ -63,13 +63,6 @@ if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then
 | 
|    PACKAGE_VERSION="${CLANG_REVISION}-0"
 | 
|  fi
 | 
|  
 | 
| -# Use both the clang revision and the plugin revisions to test for updates.
 | 
| -BLINKGCPLUGIN_REVISION=\
 | 
| -$(grep 'set(LIBRARYNAME' "$THIS_DIR"/../blink_gc_plugin/CMakeLists.txt \
 | 
| -    | cut -d ' ' -f 2 | tr -cd '[0-9]')
 | 
| -CLANG_AND_PLUGINS_REVISION="${CLANG_REVISION}-${BLINKGCPLUGIN_REVISION}"
 | 
| -
 | 
| -
 | 
|  OS="$(uname -s)"
 | 
|  
 | 
|  # Parse command line options.
 | 
| @@ -190,14 +183,13 @@ if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then
 | 
|      fi
 | 
|    fi
 | 
|  
 | 
| -  if [[ "${OS}" == "Linux" ]]; then
 | 
| -    # TODO(hans): Might need to make this work on Mac eventually.
 | 
| +  if [[ "${OS}" == "Linux" || "${OS}" == "Darwin" ]]; then
 | 
|      if [[ $(cmake --version | grep -Eo '[0-9.]+') < "3.0" ]]; then
 | 
|        # We need a newer CMake version.
 | 
|        if [[ ! -e "${LLVM_BUILD_TOOLS_DIR}/cmake310" ]]; then
 | 
|          echo "Downloading pre-built CMake 3.10..."
 | 
|          mkdir -p "${LLVM_BUILD_TOOLS_DIR}"
 | 
| -        curl --fail -L "${CDS_URL}/tools/cmake310.tgz" | \
 | 
| +        curl --fail -L "${CDS_URL}/tools/cmake310_${OS}.tgz" | \
 | 
|            tar zxf - -C "${LLVM_BUILD_TOOLS_DIR}"
 | 
|          echo Done
 | 
|        fi
 | 
| @@ -322,6 +314,7 @@ for i in \
 | 
|        "${CLANG_DIR}/test/SemaCXX/typo-correction-delayed.cpp" \
 | 
|        "${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" \
 | 
|        ; do
 | 
|    if [[ -e "${i}" ]]; then
 | 
|      rm -f "${i}"  # For unversioned files.
 | 
| @@ -404,6 +397,27 @@ 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' |
 | 
| @@ -551,6 +565,14 @@ if [ "${OS}" = "Linux" ]; then
 | 
|    BINUTILS_INCDIR="${ABS_BINUTILS_DIR}/Linux_x64/Release/include"
 | 
|  fi
 | 
|  
 | 
| +
 | 
| +# If building at head, define a macro that plugins can use for #ifdefing
 | 
| +# out code that builds at head, but not at CLANG_REVISION or vice versa.
 | 
| +if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then
 | 
| +  CFLAGS="${CFLAGS} -DLLVM_FORCE_HEAD_REVISION"
 | 
| +  CXXFLAGS="${CXXFLAGS} -DLLVM_FORCE_HEAD_REVISION"
 | 
| +fi
 | 
| +
 | 
|  # Hook the Chromium tools into the LLVM build. Several Chromium tools have
 | 
|  # dependencies on LLVM/Clang libraries. The LLVM build detects implicit tools
 | 
|  # in the tools subdirectory, so install a shim CMakeLists.txt that forwards to
 | 
| 
 |