summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authormithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 15:50:01 +0000
committermithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 15:50:01 +0000
commit04be64dff4bcd30fbe0615441091f1e73f27e105 (patch)
tree4ef27aea77bec79ed6cbd009d0e5181325b4ba11 /tools/clang
parentb4d51461b0b7df2e89d08d697e3cdfcebb2bbee1 (diff)
downloadchromium_src-04be64dff4bcd30fbe0615441091f1e73f27e105.zip
chromium_src-04be64dff4bcd30fbe0615441091f1e73f27e105.tar.gz
chromium_src-04be64dff4bcd30fbe0615441091f1e73f27e105.tar.bz2
Removing the misleading comments about mac-only.
clang is regularly used on Linux too and work is going on to make Windows work. BUG= Review URL: https://codereview.chromium.org/212203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rwxr-xr-xtools/clang/scripts/update.sh35
1 files changed, 21 insertions, 14 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index 386e8cb..113905c 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -45,8 +45,8 @@ set -eu
OS="$(uname -s)"
# Parse command line options.
+if_needed=
force_local_build=
-mac_only=
run_tests=
bootstrap=
with_android=yes
@@ -67,12 +67,12 @@ while [[ $# > 0 ]]; do
--bootstrap)
bootstrap=yes
;;
+ --if-needed)
+ if_needed=yes
+ ;;
--force-local-build)
force_local_build=yes
;;
- --mac-only)
- mac_only=yes
- ;;
--run-tests)
run_tests=yes
;;
@@ -103,10 +103,10 @@ while [[ $# > 0 ]]; do
;;
--help)
- echo "usage: $0 [--force-local-build] [--mac-only] [--run-tests] "
+ echo "usage: $0 [--force-local-build] [--if-needed] [--run-tests] "
echo "--bootstrap: First build clang with CC, then with itself."
echo "--force-local-build: Don't try to download prebuilt binaries."
- echo "--mac-only: Do initial download only on Mac systems."
+ echo "--if-needed: Download clang only if the script thinks it is needed."
echo "--run-tests: Run tests after building. Only for local builds."
echo "--without-android: Don't build ASan Android runtime library."
echo "--with-chrome-tools: Select which chrome tools to build." \
@@ -127,14 +127,21 @@ while [[ $# > 0 ]]; do
shift
done
-# --mac-only prevents the initial download on non-mac systems, but if clang has
-# already been downloaded in the past, this script keeps it up to date even if
-# --mac-only is passed in and the system isn't a mac. People who don't like this
-# can just delete their third_party/llvm-build directory.
-if [[ -n "$mac_only" ]] && [[ "${OS}" != "Darwin" ]] &&
- [[ ! ( "$GYP_DEFINES" =~ .*(clang|tsan|asan|lsan|msan)=1.* ) ]] &&
- ! [[ -d "${LLVM_BUILD_DIR}" ]]; then
- exit 0
+if [[ -n "$if_needed" ]]; then
+ if [[ "${OS}" == "Darwin" ]]; then
+ # clang is used on Mac.
+ true
+ elif [[ "$GYP_DEFINES" =~ .*(clang|tsan|asan|lsan|msan)=1.* ]]; then
+ # clang requested via $GYP_DEFINES.
+ true
+ elif [[ -d "${LLVM_BUILD_DIR}" ]]; then
+ # clang previously downloaded, remove third_party/llvm-build to prevent
+ # updating.
+ true
+ else
+ # clang wasn't needed, not doing anything.
+ exit 0
+ fi
fi
# Xcode and clang don't get along when predictive compilation is enabled.