OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This script will check out llvm and clang, and then package the results up | 6 # This script will check out llvm and clang, and then package the results up |
7 # to a tgz file. | 7 # to a tgz file. |
8 | 8 |
9 THIS_DIR="$(dirname "${0}")" | 9 THIS_DIR="$(dirname "${0}")" |
10 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" | 10 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 cp buildlog.txt $PDIR/ | 52 cp buildlog.txt $PDIR/ |
53 | 53 |
54 # Copy clang into pdir, symlink clang++ to it. | 54 # Copy clang into pdir, symlink clang++ to it. |
55 cp "${LLVM_BIN_DIR}/clang" $PDIR/bin/ | 55 cp "${LLVM_BIN_DIR}/clang" $PDIR/bin/ |
56 (cd $PDIR/bin && ln -sf clang clang++ && cd -) | 56 (cd $PDIR/bin && ln -sf clang clang++ && cd -) |
57 cp "${LLVM_BIN_DIR}/llvm-symbolizer" $PDIR/bin/ | 57 cp "${LLVM_BIN_DIR}/llvm-symbolizer" $PDIR/bin/ |
58 | 58 |
59 # Copy plugins. Some of the dylibs are pretty big, so copy only the ones we | 59 # Copy plugins. Some of the dylibs are pretty big, so copy only the ones we |
60 # care about. | 60 # care about. |
61 cp "${LLVM_LIB_DIR}/libFindBadConstructs.${SO_EXT}" $PDIR/lib | 61 cp "${LLVM_LIB_DIR}/libFindBadConstructs.${SO_EXT}" $PDIR/lib |
| 62 cp "${LLVM_LIB_DIR}/libprofile_rt.${SO_EXT}" $PDIR/lib |
62 | 63 |
63 # Copy built-in headers (lib/clang/3.2/include). | 64 # Copy built-in headers (lib/clang/3.2/include). |
64 # libcompiler-rt puts all kinds of libraries there too, but we want only some. | 65 # libcompiler-rt puts all kinds of libraries there too, but we want only some. |
65 if [ "$(uname -s)" = "Darwin" ]; then | 66 if [ "$(uname -s)" = "Darwin" ]; then |
66 # Keep only | 67 # Keep only |
67 # Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.{asan,profile}_osx* | 68 # Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.{asan,profile}_osx* |
68 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' \ | 69 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' \ |
69 ! -name '*asan_osx*' ! -name '*profile_osx*' | xargs rm | 70 ! -name '*asan_osx*' ! -name '*profile_osx*' | xargs rm |
70 # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to | 71 # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to |
71 # @executable_path. | 72 # @executable_path. |
(...skipping 15 matching lines...) Expand all Loading... |
87 | 88 |
88 if [ "$(uname -s)" = "Darwin" ]; then | 89 if [ "$(uname -s)" = "Darwin" ]; then |
89 PLATFORM=Mac | 90 PLATFORM=Mac |
90 else | 91 else |
91 PLATFORM=Linux_x64 | 92 PLATFORM=Linux_x64 |
92 fi | 93 fi |
93 | 94 |
94 echo To upload, run: | 95 echo To upload, run: |
95 echo gsutil cp -a public-read $PDIR.tgz \ | 96 echo gsutil cp -a public-read $PDIR.tgz \ |
96 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz | 97 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz |
OLD | NEW |