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

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

Issue 7890052: mac: Clobber pch files after clang updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +x Created 9 years, 3 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 | 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 #!/bin/bash 1 #!/bin/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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 PREVIOUSLY_BUILT_REVISON=$(cat "${STAMP_FILE}") 53 PREVIOUSLY_BUILT_REVISON=$(cat "${STAMP_FILE}")
54 if [ -z "$force_local_build" -a \ 54 if [ -z "$force_local_build" -a \
55 "${PREVIOUSLY_BUILT_REVISON}" = "${CLANG_REVISION}" ]; then 55 "${PREVIOUSLY_BUILT_REVISON}" = "${CLANG_REVISION}" ]; then
56 echo "Clang already at ${CLANG_REVISION}" 56 echo "Clang already at ${CLANG_REVISION}"
57 exit 0 57 exit 0
58 fi 58 fi
59 fi 59 fi
60 # To always force a new build if someone interrupts their build half way. 60 # To always force a new build if someone interrupts their build half way.
61 rm -f "${STAMP_FILE}" 61 rm -f "${STAMP_FILE}"
62 62
63 # Clobber pch files, since they only work with the compiler version that
64 # created them.
65 if [[ "$(uname -s)" = "Darwin" ]]; then
Nico 2011/09/14 21:31:34 I'll switch this to ${OS} once that other CL is in
66 XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild"
67 MAKE_DIR="${THIS_DIR}/../../../out"
68 for CONFIG in Debug Release; do
69 if [[ -d "${MAKE_DIR}/${CONFIG}" ]]; then
70 echo "Clobbering ${CONFIG} PCH files for make build"
71 find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.gch' | xargs rm
72 fi
73
74 if [[ -d "${XCODEBUILD_DIR}/${CONFIG}" ]]; then
75 echo "Clobbering ${CONFIG} PCH files for xcode build"
76 rm -rf "${XCODEBUILD_DIR}/${CONFIG}"/SharedPrecompiledHeaders/*
77 fi
78 done
79 fi
80
63 if [ -z "$force_local_build" ]; then 81 if [ -z "$force_local_build" ]; then
64 # Check if there's a prebuilt binary and if so just fetch that. That's faster, 82 # Check if there's a prebuilt binary and if so just fetch that. That's faster,
65 # and goma relies on having matching binary hashes on client and server too. 83 # and goma relies on having matching binary hashes on client and server too.
66 CDS_URL=http://commondatastorage.googleapis.com/chromium-browser-clang 84 CDS_URL=http://commondatastorage.googleapis.com/chromium-browser-clang
67 CDS_FILE="clang-${CLANG_REVISION}.tgz" 85 CDS_FILE="clang-${CLANG_REVISION}.tgz"
68 echo Trying to download prebuilt clang 86 echo Trying to download prebuilt clang
69 if [ "$(uname -s)" = "Linux" ]; then 87 if [ "$(uname -s)" = "Linux" ]; then
70 wget "${CDS_URL}/Linux_x64/${CDS_FILE}" || rm -f "${CDS_FILE}" 88 wget "${CDS_URL}/Linux_x64/${CDS_FILE}" || rm -f "${CDS_FILE}"
71 elif [ "$(uname -s)" = "Darwin" ]; then 89 elif [ "$(uname -s)" = "Darwin" ]; then
72 curl -L --fail -O "${CDS_URL}/Mac/${CDS_FILE}" || rm -f "${CDS_FILE}" 90 curl -L --fail -O "${CDS_URL}/Mac/${CDS_FILE}" || rm -f "${CDS_FILE}"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin" 154 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin"
137 rm -rf "${PLUGIN_DST_DIR}" 155 rm -rf "${PLUGIN_DST_DIR}"
138 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}" 156 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}"
139 rm -rf "${PLUGIN_BUILD_DIR}" 157 rm -rf "${PLUGIN_BUILD_DIR}"
140 mkdir -p "${PLUGIN_BUILD_DIR}" 158 mkdir -p "${PLUGIN_BUILD_DIR}"
141 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" 159 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}"
142 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" 160 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}"
143 161
144 # After everything is done, log success for this revision. 162 # After everything is done, log success for this revision.
145 echo "${CLANG_REVISION}" > "${STAMP_FILE}" 163 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