Index: tools/clang/scripts/update.sh |
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh |
index f3a261b4e4a955899875baa0b07796e26e968cd7..e4bf68b22af9b0d2fd51d5cfa1c926587ffdb5cc 100755 |
--- a/tools/clang/scripts/update.sh |
+++ b/tools/clang/scripts/update.sh |
@@ -60,6 +60,24 @@ fi |
# To always force a new build if someone interrupts their build half way. |
rm -f "${STAMP_FILE}" |
+# Clobber pch files, since they only work with the compiler version that |
+# created them. |
+if [[ "$(uname -s)" = "Darwin" ]]; then |
Nico
2011/09/14 21:31:34
I'll switch this to ${OS} once that other CL is in
|
+ XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild" |
+ MAKE_DIR="${THIS_DIR}/../../../out" |
+ for CONFIG in Debug Release; do |
+ if [[ -d "${MAKE_DIR}/${CONFIG}" ]]; then |
+ echo "Clobbering ${CONFIG} PCH files for make build" |
+ find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.gch' | xargs rm |
+ fi |
+ |
+ if [[ -d "${XCODEBUILD_DIR}/${CONFIG}" ]]; then |
+ echo "Clobbering ${CONFIG} PCH files for xcode build" |
+ rm -rf "${XCODEBUILD_DIR}/${CONFIG}"/SharedPrecompiledHeaders/* |
+ fi |
+ done |
+fi |
+ |
if [ -z "$force_local_build" ]; then |
# Check if there's a prebuilt binary and if so just fetch that. That's faster, |
# and goma relies on having matching binary hashes on client and server too. |