Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: tools/clang/scripts/package.sh

Issue 7741039: roll clang 138187:138188 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 520 Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 llvm and clang, and then package the results up
7 # to a tgz file.
8
9 THIS_DIR="$(dirname "${0}")"
10 LLVM_BUILD_DIR="${THIS_DIR}/../../../third_party/llvm-build"
11 LLVM_BIN_DIR="${LLVM_BUILD_DIR}/Release+Asserts/bin"
12 LLVM_LIB_DIR="${LLVM_BUILD_DIR}/Release+Asserts/lib"
13
14 set -ex
15
16 # Do a clobber build.
17 rm -rf "${LLVM_BUILD_DIR}"
18 "${THIS_DIR}"/update.sh
19
20 R=$("${LLVM_BIN_DIR}/clang" --version | \
21 sed -ne 's/clang version .*(trunk \([0-9]*\))/\1/p')
22
23 PDIR=clang-$R
24 rm -rf $PDIR
Mark Mentovai 2011/08/26 16:55:19 It’s wise to always use this as "${PDIR}" instead
Nico 2011/08/27 05:25:33 Done.
25 mkdir $PDIR
26 mkdir $PDIR/bin
27 mkdir $PDIR/lib
28
29 # Copy clang into pdir, symlink clang++ to it.
30 cp "${LLVM_BIN_DIR}/clang" $PDIR/bin/
31 (cd $PDIR/bin && ln -sf clang clang++ && cd -)
32
33 # Copy plugins. Some of the dylibs are pretty big, so copy only the ones we
34 # care about.
35 if [ "$(uname -s)" = "Darwin" ]; then
Mark Mentovai 2011/08/26 16:55:19 Same |uname -s| suggestion as in the other file ap
36 cp "${LLVM_LIB_DIR}/libFindBadConstructs.dylib" $PDIR/lib
37 else
38 cp "${LLVM_LIB_DIR}/libFindBadConstructs.so" $PDIR/lib
39 fi
40
41 # Copy built-in headers (lib/clang/3.0/include).
42 cp -R "${LLVM_LIB_DIR}/clang" $PDIR/lib
43
44 tar zcf $PDIR.tgz -C $PDIR bin lib
45
46 if [ "$(uname -s)" = "Darwin" ]; then
47 PLATFORM=Mac
48 else
49 PLATFORM=Linux_x64
50 fi
51
52 echo To upload, run:
53 echo gsutil cp -a public-read $PDIR.tgz \
Mark Mentovai 2011/08/26 16:55:19 What sort of access control do we have on this?
Nico 2011/08/27 05:25:33 Everyone can read, only people with Magic Permissi
54 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz
OLDNEW
« no previous file with comments | « DEPS ('k') | tools/clang/scripts/update.sh » ('j') | tools/clang/scripts/update.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698