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

Unified Diff: tools/clang/scripts/update.sh

Issue 12223047: Make it easier to build new tools for Clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.sh
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index 2700001d62173ac12c61335b2d88d6051e6ac353..82f124c0cdfc16b69372caded9b108328f64fd62 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -313,21 +313,26 @@ if [[ -n "${with_android}" ]]; then
cd -
fi
-# Build plugin.
-# Copy it into the clang tree and use clang's build system to compile the
-# plugin.
-PLUGIN_SRC_DIR="${THIS_DIR}/../plugins"
-PLUGIN_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-plugin"
-PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin"
-rm -rf "${PLUGIN_DST_DIR}"
-cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}"
-rm -rf "${PLUGIN_BUILD_DIR}"
-mkdir -p "${PLUGIN_BUILD_DIR}"
-cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}"
-MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}"
+# Build Chrome-specific clang tools. Paths in this list should be relative to
+# tools/clang.
+CHROME_TOOL_DIRS="plugins"
+# For each tool directory, copy it into the clang tree and use clang's build
+# system to compile it.
+for CHROME_TOOL_DIR in ${CHROME_TOOL_DIRS}; do
+ TOOL_SRC_DIR="${THIS_DIR}/../${CHROME_TOOL_DIR}"
+ TOOL_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}"
+ TOOL_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}"
+ rm -rf "${TOOL_DST_DIR}"
+ cp -R "${TOOL_SRC_DIR}" "${TOOL_DST_DIR}"
+ rm -rf "${TOOL_BUILD_DIR}"
+ mkdir -p "${TOOL_BUILD_DIR}"
+ cp "${TOOL_SRC_DIR}/Makefile" "${TOOL_BUILD_DIR}"
+ MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${TOOL_BUILD_DIR}"
+done
if [[ -n "$run_tests" ]]; then
# Run a few tests.
+ PLUGIN_SRC_DIR="${THIS_DIR}/../plugins"
"${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts"
cd "${LLVM_BUILD_DIR}"
make check-all
« 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