Index: tools/clang/scripts/update.sh |
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh |
index 20f1ffae53d900abfc47a6e8a95164035468e2af..f7200748f8dd6c86c3d3cc3e015b3617d819dba3 100755 |
--- a/tools/clang/scripts/update.sh |
+++ b/tools/clang/scripts/update.sh |
@@ -79,6 +79,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 [[ "${OS}" = "Darwin" ]]; then |
+ XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild" |
+ MAKE_DIR="${THIS_DIR}/../../../out" |
+ for CONFIG in Debug Release; do |
+ if [[ -d "${MAKE_DIR}/${CONFIG}" ]]; then |
Mark Mentovai
2011/09/15 02:53:46
Want to include /obj.target here too?
Nico
2011/09/15 03:00:08
Done.
|
+ echo "Clobbering ${CONFIG} PCH files for make build" |
+ find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.gch' | xargs rm |
Mark Mentovai
2011/09/15 02:53:46
find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.g
Nico
2011/09/15 03:00:08
Done. (DIdn't know about '+' up until now, thanks!
|
+ fi |
+ |
+ if [[ -d "${XCODEBUILD_DIR}/${CONFIG}" ]]; then |
Mark Mentovai
2011/09/15 02:53:46
Want to include /SharedPrecompiledHeaders here too
Nico
2011/09/15 03:00:08
Done.
|
+ echo "Clobbering ${CONFIG} PCH files for xcode build" |
Mark Mentovai
2011/09/15 02:53:46
Nit: capital X in Xcode.
Nico
2011/09/15 03:00:08
Done.
|
+ rm -rf "${XCODEBUILD_DIR}/${CONFIG}"/SharedPrecompiledHeaders/* |
Mark Mentovai
2011/09/15 02:53:46
Drop the /*. It’s OK to just remove all of SharedP
Nico
2011/09/15 03:00:08
Done.
|
+ 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. |