OLD | NEW |
| (Empty) |
1 #!/bin/bash | |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 # This script will check out iwyu into the llvm directory and build it. | |
7 # iwyu will appear in third_party/llvm-build/Release+Asserts/bin. | |
8 | |
9 # Die if any command dies. | |
10 set -e | |
11 | |
12 # Echo all commands. | |
13 set -x | |
14 | |
15 THIS_DIR="$(dirname "${0}")" | |
16 | |
17 # Make sure clang is checked out and built. | |
18 "${THIS_DIR}"/update.sh | |
19 | |
20 LLVM_DIR="${THIS_DIR}"/../../../third_party/llvm | |
21 IWYU_DIR="${LLVM_DIR}"/tools/clang/tools/include-what-you-use | |
22 | |
23 # Check out. | |
24 svn co --force https://include-what-you-use.googlecode.com/svn/trunk/ \ | |
25 "${IWYU_DIR}" | |
26 | |
27 # Build iwyu. | |
28 # Copy it into the clang tree and use clang's build system to compile it. | |
29 LLVM_BUILD_DIR="${LLVM_DIR}"/../llvm-build | |
30 IWYU_BUILD_DIR="${LLVM_BUILD_DIR}"/tools/clang/tools/include-what-you-use | |
31 mkdir -p "${IWYU_BUILD_DIR}" | |
32 cp "${IWYU_DIR}"/Makefile "${IWYU_BUILD_DIR}" | |
33 make -j"${NUM_JOBS}" -C "${IWYU_BUILD_DIR}" | |
OLD | NEW |