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

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

Issue 881763003: Roll Clang 223108:228742 (Closed) Base URL: precise:/work/chromium/src@clang_roll_226907
Patch Set: Re-upload Created 5 years, 10 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
« no previous file with comments | « tools/clang/scripts/blink_gc_plugin_flags.sh ('k') | tools/clang/scripts/plugin_flags.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 gcc_toolchain= 9 gcc_toolchain=
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 done 45 done
46 46
47 47
48 THIS_DIR="$(dirname "${0}")" 48 THIS_DIR="$(dirname "${0}")"
49 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm" 49 LLVM_DIR="${THIS_DIR}/../../../third_party/llvm"
50 LLVM_BOOTSTRAP_DIR="${THIS_DIR}/../../../third_party/llvm-bootstrap" 50 LLVM_BOOTSTRAP_DIR="${THIS_DIR}/../../../third_party/llvm-bootstrap"
51 LLVM_BOOTSTRAP_INSTALL_DIR="${LLVM_DIR}/../llvm-bootstrap-install" 51 LLVM_BOOTSTRAP_INSTALL_DIR="${LLVM_DIR}/../llvm-bootstrap-install"
52 LLVM_BUILD_DIR="${THIS_DIR}/../../../third_party/llvm-build" 52 LLVM_BUILD_DIR="${THIS_DIR}/../../../third_party/llvm-build"
53 LLVM_BIN_DIR="${LLVM_BUILD_DIR}/Release+Asserts/bin" 53 LLVM_BIN_DIR="${LLVM_BUILD_DIR}/Release+Asserts/bin"
54 LLVM_LIB_DIR="${LLVM_BUILD_DIR}/Release+Asserts/lib" 54 LLVM_LIB_DIR="${LLVM_BUILD_DIR}/Release+Asserts/lib"
55 STAMP_FILE="${LLVM_DIR}/../llvm-build/cr_build_revision"
55 56
56 echo "Diff in llvm:" | tee buildlog.txt 57 echo "Diff in llvm:" | tee buildlog.txt
57 svn stat "${LLVM_DIR}" 2>&1 | tee -a buildlog.txt 58 svn stat "${LLVM_DIR}" 2>&1 | tee -a buildlog.txt
58 svn diff "${LLVM_DIR}" 2>&1 | tee -a buildlog.txt 59 svn diff "${LLVM_DIR}" 2>&1 | tee -a buildlog.txt
59 echo "Diff in llvm/tools/clang:" | tee -a buildlog.txt 60 echo "Diff in llvm/tools/clang:" | tee -a buildlog.txt
60 svn stat "${LLVM_DIR}/tools/clang" 2>&1 | tee -a buildlog.txt 61 svn stat "${LLVM_DIR}/tools/clang" 2>&1 | tee -a buildlog.txt
61 svn diff "${LLVM_DIR}/tools/clang" 2>&1 | tee -a buildlog.txt 62 svn diff "${LLVM_DIR}/tools/clang" 2>&1 | tee -a buildlog.txt
62 echo "Diff in llvm/compiler-rt:" | tee -a buildlog.txt 63 echo "Diff in llvm/compiler-rt:" | tee -a buildlog.txt
63 svn stat "${LLVM_DIR}/compiler-rt" 2>&1 | tee -a buildlog.txt 64 svn stat "${LLVM_DIR}/compiler-rt" 2>&1 | tee -a buildlog.txt
64 svn diff "${LLVM_DIR}/compiler-rt" 2>&1 | tee -a buildlog.txt 65 svn diff "${LLVM_DIR}/compiler-rt" 2>&1 | tee -a buildlog.txt
(...skipping 14 matching lines...) Expand all
79 rm -rf "${LLVM_BOOTSTRAP_DIR}" 80 rm -rf "${LLVM_BOOTSTRAP_DIR}"
80 rm -rf "${LLVM_BOOTSTRAP_INSTALL_DIR}" 81 rm -rf "${LLVM_BOOTSTRAP_INSTALL_DIR}"
81 rm -rf "${LLVM_BUILD_DIR}" 82 rm -rf "${LLVM_BUILD_DIR}"
82 extra_flags= 83 extra_flags=
83 if [[ -n "${gcc_toolchain}" ]]; then 84 if [[ -n "${gcc_toolchain}" ]]; then
84 extra_flags="--gcc-toolchain ${gcc_toolchain}" 85 extra_flags="--gcc-toolchain ${gcc_toolchain}"
85 fi 86 fi
86 "${THIS_DIR}"/update.sh --bootstrap --force-local-build --run-tests \ 87 "${THIS_DIR}"/update.sh --bootstrap --force-local-build --run-tests \
87 ${extra_flags} 2>&1 | tee -a buildlog.txt 88 ${extra_flags} 2>&1 | tee -a buildlog.txt
88 89
89 R=$("${LLVM_BIN_DIR}/clang" --version | \ 90 R=$(cat "${STAMP_FILE}")
90 sed -ne 's/clang version .*(trunk \([0-9]*\))/\1/p')
91 91
92 PDIR=clang-$R 92 PDIR=clang-$R
93 rm -rf $PDIR 93 rm -rf $PDIR
94 mkdir $PDIR 94 mkdir $PDIR
95 mkdir $PDIR/bin 95 mkdir $PDIR/bin
96 mkdir $PDIR/lib 96 mkdir $PDIR/lib
97 97
98 if [ "$(uname -s)" = "Darwin" ]; then 98 if [ "$(uname -s)" = "Darwin" ]; then
99 SO_EXT="dylib" 99 SO_EXT="dylib"
100 else 100 else
(...skipping 14 matching lines...) Expand all
115 115
116 # Copy libc++ headers. 116 # Copy libc++ headers.
117 if [ "$(uname -s)" = "Darwin" ]; then 117 if [ "$(uname -s)" = "Darwin" ]; then
118 mkdir $PDIR/include 118 mkdir $PDIR/include
119 cp -R "${LLVM_BOOTSTRAP_INSTALL_DIR}/include/c++" $PDIR/include 119 cp -R "${LLVM_BOOTSTRAP_INSTALL_DIR}/include/c++" $PDIR/include
120 fi 120 fi
121 121
122 # Copy plugins. Some of the dylibs are pretty big, so copy only the ones we 122 # Copy plugins. Some of the dylibs are pretty big, so copy only the ones we
123 # care about. 123 # care about.
124 cp "${LLVM_LIB_DIR}/libFindBadConstructs.${SO_EXT}" $PDIR/lib 124 cp "${LLVM_LIB_DIR}/libFindBadConstructs.${SO_EXT}" $PDIR/lib
125 125 cp "${LLVM_LIB_DIR}/libBlinkGCPlugin.${SO_EXT}" $PDIR/lib
126 BLINKGCPLUGIN_LIBNAME=\
127 $(grep 'set(LIBRARYNAME' "$THIS_DIR"/../blink_gc_plugin/CMakeLists.txt \
128 | cut -d ' ' -f 2 | tr -d ')')
129 cp "${LLVM_LIB_DIR}/lib${BLINKGCPLUGIN_LIBNAME}.${SO_EXT}" $PDIR/lib
130 126
131 if [[ -n "${gcc_toolchain}" ]]; then 127 if [[ -n "${gcc_toolchain}" ]]; then
132 # Copy the stdlibc++.so.6 we linked Clang against so it can run. 128 # Copy the stdlibc++.so.6 we linked Clang against so it can run.
133 cp "${LLVM_LIB_DIR}/libstdc++.so.6" $PDIR/lib 129 cp "${LLVM_LIB_DIR}/libstdc++.so.6" $PDIR/lib
134 fi 130 fi
135 131
136 # Copy built-in headers (lib/clang/3.x.y/include). 132 # Copy built-in headers (lib/clang/3.x.y/include).
137 # compiler-rt builds all kinds of libraries, but we want only some. 133 # compiler-rt builds all kinds of libraries, but we want only some.
138 if [ "$(uname -s)" = "Darwin" ]; then 134 if [ "$(uname -s)" = "Darwin" ]; then
139 # Keep only the OSX (ASan and profile) and iossim (ASan) runtime libraries: 135 # Keep only the OSX (ASan and profile) and iossim (ASan) runtime libraries:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 171
176 if [ "$(uname -s)" = "Darwin" ]; then 172 if [ "$(uname -s)" = "Darwin" ]; then
177 PLATFORM=Mac 173 PLATFORM=Mac
178 else 174 else
179 PLATFORM=Linux_x64 175 PLATFORM=Linux_x64
180 fi 176 fi
181 177
182 echo To upload, run: 178 echo To upload, run:
183 echo gsutil cp -a public-read $PDIR.tgz \ 179 echo gsutil cp -a public-read $PDIR.tgz \
184 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz 180 gs://chromium-browser-clang/$PLATFORM/$PDIR.tgz
181
182 # FIXME: Warn if the file already exists on the server.
OLDNEW
« no previous file with comments | « tools/clang/scripts/blink_gc_plugin_flags.sh ('k') | tools/clang/scripts/plugin_flags.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698