OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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, build a full package | 6 # This script will check out llvm and clang, build a full package |
7 # with the latest plugin revisions and then repackage an existing | 7 # with the latest plugin revisions and then repackage an existing |
8 # clang-package with the new plugin revisions. | 8 # clang-package with the new plugin revisions. |
9 | 9 |
10 # The new package can be uploaded to replace the existing clang | 10 # The new package can be uploaded to replace the existing clang |
(...skipping 12 matching lines...) Expand all Loading... |
23 SO_EXT="dylib" | 23 SO_EXT="dylib" |
24 else | 24 else |
25 PLATFORM=Linux_x64 | 25 PLATFORM=Linux_x64 |
26 SO_EXT="so" | 26 SO_EXT="so" |
27 fi | 27 fi |
28 | 28 |
29 # Build clang with the new plugin revisions. | 29 # Build clang with the new plugin revisions. |
30 "$THIS_DIR"/package.sh $@ | 30 "$THIS_DIR"/package.sh $@ |
31 | 31 |
32 R=$("${LLVM_BIN_DIR}/clang" --version | \ | 32 R=$("${LLVM_BIN_DIR}/clang" --version | \ |
33 sed -ne 's/clang version .*(\([0-9]*\))/\1/p') | 33 sed -ne 's/clang version .*(trunk \([0-9]*\))/\1/p') |
34 PDIR=clang-$R | 34 PDIR=clang-$R |
35 | 35 |
36 if [ ! -f "$PDIR.tgz" ]; then | 36 if [ ! -f "$PDIR.tgz" ]; then |
37 echo "Could not find package archive $PDIR.tgz generated by package.sh" | 37 echo "Could not find package archive $PDIR.tgz generated by package.sh" |
38 exit 1 | 38 exit 1 |
39 fi | 39 fi |
40 | 40 |
41 # We don't want to change the clang binary, so fetch the current clang | 41 # We don't want to change the clang binary, so fetch the current clang |
42 # package and add the plugin shared-libraries to the existing package. | 42 # package and add the plugin shared-libraries to the existing package. |
43 rm -rf $LLVM_BUILD_DIR | 43 rm -rf $LLVM_BUILD_DIR |
(...skipping 14 matching lines...) Expand all Loading... |
58 if [ "$(uname -s)" = "Darwin" ]; then | 58 if [ "$(uname -s)" = "Darwin" ]; then |
59 tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin include lib buildlog.txt | 59 tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin include lib buildlog.txt |
60 else | 60 else |
61 tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin lib buildlog.txt | 61 tar zcf ${PDIR}_repack.tgz -C "$LLVM_TAR_DIR" bin lib buildlog.txt |
62 fi | 62 fi |
63 | 63 |
64 echo The clang package has been repackaged with $LIBNAME | 64 echo The clang package has been repackaged with $LIBNAME |
65 echo To upload, run: | 65 echo To upload, run: |
66 echo gsutil cp -a public-read ${PDIR}_repack.tgz \ | 66 echo gsutil cp -a public-read ${PDIR}_repack.tgz \ |
67 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz | 67 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz |
OLD | NEW |