summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-11 18:53:41 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-11 18:53:41 +0000
commit5d71b8d9571b481f2affe57a0b5eda22ea8db867 (patch)
treef38649ae44b6a5ed91860be1cafe5d9844bc75cf /tools/clang
parent5b9f354f4a65e67b198b476e1d49b03c986ab91d (diff)
downloadchromium_src-5d71b8d9571b481f2affe57a0b5eda22ea8db867.zip
chromium_src-5d71b8d9571b481f2affe57a0b5eda22ea8db867.tar.gz
chromium_src-5d71b8d9571b481f2affe57a0b5eda22ea8db867.tar.bz2
clang: Clobber .o files non non-darwin as well.
BUG=113653 TEST=clang rolls clobber .o files on linux bots too Review URL: http://codereview.chromium.org/9378033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rwxr-xr-xtools/clang/scripts/update.sh61
1 files changed, 33 insertions, 28 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index a408abe..5b0694f 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -109,42 +109,47 @@ rm -f "${STAMP_FILE}"
# with the new compiler.
if [[ "${OS}" = "Darwin" ]]; then
XCODEBUILD_DIR="${THIS_DIR}/../../../xcodebuild"
- if [ -f "${THIS_DIR}/../../../WebKit.gyp" ]; then
- # We're inside a WebKit checkout.
- # TODO(thakis): try to unify the directory layout of the xcode- and
- # make-based builds. http://crbug.com/110455
- MAKE_DIR="${THIS_DIR}/../../../../../../out"
- else
- # We're inside a Chromium checkout.
- MAKE_DIR="${THIS_DIR}/../../../out"
+
+ # Xcode groups .o files by project first, configuration second.
+ if [[ -d "${XCODEBUILD_DIR}" ]]; then
+ echo "Clobbering .o files for Xcode build"
+ find "${XCODEBUILD_DIR}" -name '*.o' -exec rm {} +
fi
- for CONFIG in Debug Release; do
- if [[ -d "${MAKE_DIR}/${CONFIG}/obj.target" ||
- -d "${MAKE_DIR}/${CONFIG}/obj.host" ]]; then
- echo "Clobbering ${CONFIG} PCH and .o files for make build"
- find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.gch' -exec rm {} +
- find "${MAKE_DIR}/${CONFIG}/obj.host" -name '*.o' -exec rm {} +
- find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.o' -exec rm {} +
- fi
+fi
- # ninja puts its output below ${MAKE_DIR} as well.
- if [[ -d "${MAKE_DIR}/${CONFIG}/obj" ]]; then
- echo "Clobbering ${CONFIG} PCH and .o files for ninja build"
- find "${MAKE_DIR}/${CONFIG}/obj" -name '*.gch' -exec rm {} +
- find "${MAKE_DIR}/${CONFIG}/obj" -name '*.o' -exec rm {} +
- fi
+if [ -f "${THIS_DIR}/../../../WebKit.gyp" ]; then
+ # We're inside a WebKit checkout.
+ # TODO(thakis): try to unify the directory layout of the xcode- and
+ # make-based builds. http://crbug.com/110455
+ MAKE_DIR="${THIS_DIR}/../../../../../../out"
+else
+ # We're inside a Chromium checkout.
+ MAKE_DIR="${THIS_DIR}/../../../out"
+fi
+for CONFIG in Debug Release; do
+ if [[ -d "${MAKE_DIR}/${CONFIG}/obj.target" ||
+ -d "${MAKE_DIR}/${CONFIG}/obj.host" ]]; then
+ echo "Clobbering ${CONFIG} PCH and .o files for make build"
+ find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.gch' -exec rm {} +
+ find "${MAKE_DIR}/${CONFIG}/obj.host" -name '*.o' -exec rm {} +
+ find "${MAKE_DIR}/${CONFIG}/obj.target" -name '*.o' -exec rm {} +
+ fi
+
+ # ninja puts its output below ${MAKE_DIR} as well.
+ if [[ -d "${MAKE_DIR}/${CONFIG}/obj" ]]; then
+ echo "Clobbering ${CONFIG} PCH and .o files for ninja build"
+ find "${MAKE_DIR}/${CONFIG}/obj" -name '*.gch' -exec rm {} +
+ find "${MAKE_DIR}/${CONFIG}/obj" -name '*.o' -exec rm {} +
+ fi
+
+ if [[ "${OS}" = "Darwin" ]]; then
if [[ -d "${XCODEBUILD_DIR}/${CONFIG}/SharedPrecompiledHeaders" ]]; then
echo "Clobbering ${CONFIG} PCH files for Xcode build"
rm -rf "${XCODEBUILD_DIR}/${CONFIG}/SharedPrecompiledHeaders"
fi
- done
- # Xcode groups .o files by project first, configuration second.
- if [[ -d "${XCODEBUILD_DIR}" ]]; then
- echo "Clobbering .o files for Xcode build"
- find "${XCODEBUILD_DIR}" -name '*.o' -exec rm {} +
fi
-fi
+done
if [[ -z "$force_local_build" ]]; then
# Check if there's a prebuilt binary and if so just fetch that. That's faster,