diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-06 20:57:39 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-06 20:57:39 +0000 |
commit | fadf1b91df3e2d36c49a371e8f06b934b368e891 (patch) | |
tree | 9898526c4529ec284622855e5fb491403d3cbfa2 /tools | |
parent | 90cf7ce6b02f9484423d3d31e1ab50f48c4fca8e (diff) | |
download | chromium_src-fadf1b91df3e2d36c49a371e8f06b934b368e891.zip chromium_src-fadf1b91df3e2d36c49a371e8f06b934b368e891.tar.gz chromium_src-fadf1b91df3e2d36c49a371e8f06b934b368e891.tar.bz2 |
Add a script that checks out and builds iwyu.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6956007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/clang/scripts/update_iwyu.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/clang/scripts/update_iwyu.sh b/tools/clang/scripts/update_iwyu.sh new file mode 100755 index 0000000..0e3f675 --- /dev/null +++ b/tools/clang/scripts/update_iwyu.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This script will check out iwyu into the llvm directory and build it. +# iwyu will appear in third_party/llvm-build/Release+Asserts/bin. + +# Die if any command dies. +set -e + +# Echo all commands. +set -x + +THIS_DIR="$(dirname "${0}")" + +# Make sure clang is checked out and built. +"${THIS_DIR}"/update.sh + +LLVM_DIR="${THIS_DIR}"/../../../third_party/llvm +IWYU_DIR="${LLVM_DIR}"/tools/clang/tools/include-what-you-use + +# Check out. +svn co --force http://include-what-you-use.googlecode.com/svn/trunk/ \ + "${IWYU_DIR}" + +# Build iwyu. +# Copy it into the clang tree and use clang's build system to compile it. +LLVM_BUILD_DIR="${LLVM_DIR}"/../llvm-build +IWYU_BUILD_DIR="${LLVM_BUILD_DIR}"/tools/clang/tools/include-what-you-use +mkdir -p "${IWYU_BUILD_DIR}" +cp "${IWYU_DIR}"/Makefile "${IWYU_BUILD_DIR}" +make -j"${NUM_JOBS}" -C "${IWYU_BUILD_DIR}" |