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 | |
63 | 62 |
64 # Copy built-in headers (lib/clang/3.2/include). | 63 # Copy built-in headers (lib/clang/3.2/include). |
65 # libcompiler-rt puts all kinds of libraries there too, but we want only some. | 64 # libcompiler-rt puts all kinds of libraries there too, but we want only some. |
66 if [ "$(uname -s)" = "Darwin" ]; then | 65 if [ "$(uname -s)" = "Darwin" ]; then |
67 # Keep only | 66 # Keep only |
68 # Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.{asan,profile}_osx* | 67 # Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.{asan,profile}_osx* |
69 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' \ | 68 find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' \ |
70 ! -name '*asan_osx*' ! -name '*profile_osx*' | xargs rm | 69 ! -name '*asan_osx*' ! -name '*profile_osx*' | xargs rm |
71 # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to | 70 # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to |
72 # @executable_path. | 71 # @executable_path. |
(...skipping 15 matching lines...) Expand all Loading... |
88 | 87 |
89 if [ "$(uname -s)" = "Darwin" ]; then | 88 if [ "$(uname -s)" = "Darwin" ]; then |
90 PLATFORM=Mac | 89 PLATFORM=Mac |
91 else | 90 else |
92 PLATFORM=Linux_x64 | 91 PLATFORM=Linux_x64 |
93 fi | 92 fi |
94 | 93 |
95 echo To upload, run: | 94 echo To upload, run: |
96 echo gsutil cp -a public-read $PDIR.tgz \ | 95 echo gsutil cp -a public-read $PDIR.tgz \ |
97 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz | 96 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz |
OLD | NEW |