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

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

Issue 7741026: clang: add an option to update.sh to pull lldb as well (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 352eff173175e1307842d2e7c49b4dce3940fe17..38516468f787f0c785b59b5892b1ca8076270513 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -9,6 +9,7 @@ THIS_DIR="$(dirname "${0}")"
LLVM_DIR="${THIS_DIR}/../../../third_party/llvm"
LLVM_BUILD_DIR="${LLVM_DIR}/../llvm-build"
CLANG_DIR="${LLVM_DIR}/tools/clang"
+LLDB_DIR="${LLVM_DIR}/tools/lldb"
DEPS_FILE="${THIS_DIR}/../../../DEPS"
STAMP_FILE="${LLVM_BUILD_DIR}/cr_build_revision"
@@ -18,6 +19,24 @@ LLVM_REPO_URL=${LLVM_URL:-http://llvm.org/svn/llvm-project}
# Die if any command dies.
set -e
+# Parse command line options.
+use_lldb=
+while [[ $# > 0 ]]; do
+ case $1 in
+ --lldb)
+ use_lldb=yes
+ ;;
+ --help)
+ echo "usage: $0 [--lldb]"
+ echo "If --lldb is passed, check out lldb as well."
+ echo "(Once lldb is checked out once, it will implicitly be updated and"
+ echo "built on further updates.)"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
# Since people need to run this script anyway to compile clang, let it check out
# clang as well if it's not in DEPS, so that people don't have to change their
# DEPS if they just want to give clang a try.
@@ -48,6 +67,16 @@ else
svn co --force "${LLVM_REPO_URL}/cfe/trunk@${CLANG_REVISION}" "${CLANG_DIR}"
fi
+# Update lldb either if the flag is passed or we have a previous checkout.
+if [ -n "$use_lldb" -o -d "${LLDB_DIR}" ]; then
+ if grep -q 'src/third_party/llvm/tools/lldb":' "${DEPS_FILE}"; then
+ echo lldb pulled in through DEPS, skipping lldb update step
+ else
+ echo Getting lldb r"${CLANG_REVISION}" in "${LLDB_DIR}"
+ svn co --force "${LLVM_REPO_URL}/lldb/trunk@${CLANG_REVISION}" "${LLDB_DIR}"
+ fi
+fi
+
# Echo all commands.
set -x
« 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