Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 3c031bd

Browse files
committed
Merging r195193:
------------------------------------------------------------------------ r195193 | void | 2013-11-19 20:55:20 -0800 (Tue, 19 Nov 2013) | 5 lines Add -triple option. The -triple option is used to create a named tarball of the release binaries. Also disable the RPATH modifications on Mac OS X. It's not needed. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195194 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c00090b commit 3c031bd

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

utils/release/test-release.sh

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Base_url="http://llvm.org/svn/llvm-project"
2626
Release=""
2727
Release_no_dot=""
2828
RC=""
29+
Triple=""
2930
do_checkout="yes"
3031
do_ada="no"
3132
do_clang="yes"
@@ -44,6 +45,7 @@ function usage() {
4445
echo " -release X.Y The release number to test."
4546
echo " -rc NUM The pre-release candidate number."
4647
echo " -final The final release candidate."
48+
echo " -triple TRIPLE The target triple for this machine."
4749
echo " -j NUM Number of compile jobs to run. [default: 3]"
4850
echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
4951
echo " -no-checkout Don't checkout the sources from SVN."
@@ -72,6 +74,10 @@ while [ $# -gt 0 ]; do
7274
-final | --final )
7375
RC=final
7476
;;
77+
-triple | --triple )
78+
shift
79+
Triple="$1"
80+
;;
7581
-j* )
7682
NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
7783
if [ -z "$NumJobs" ]; then
@@ -135,6 +141,10 @@ if [ -z "$RC" ]; then
135141
echo "error: no release candidate number specified"
136142
exit 1
137143
fi
144+
if [ -z "$Triple" ]; then
145+
echo "error: no target triple specified"
146+
exit 1
147+
fi
138148

139149
# Figure out how many make processes to run.
140150
if [ -z "$NumJobs" ]; then
@@ -159,6 +169,13 @@ cd $BuildDir
159169
LogDir=$BuildDir/logs
160170
mkdir -p $LogDir
161171

172+
# Final package name.
173+
Package=clang+llvm-$Release
174+
if [ $RC != "final" ]; then
175+
Package=$Package-$RC
176+
fi
177+
Package=$Package-$Triple
178+
162179
# Find compilers.
163180
if [ "$do_dragonegg" = "yes" ]; then
164181
gcc_compiler="$GCC"
@@ -189,9 +206,11 @@ function check_program_exists() {
189206
fi
190207
}
191208

192-
check_program_exists 'chrpath'
193-
check_program_exists 'file'
194-
check_program_exists 'objdump'
209+
if [ `uname -s` != "Darwin" ]; then
210+
check_program_exists 'chrpath'
211+
check_program_exists 'file'
212+
check_program_exists 'objdump'
213+
fi
195214

196215
# Make sure that the URLs are valid.
197216
function check_valid_urls() {
@@ -343,6 +362,9 @@ function test_llvmCore() {
343362
# Clean RPATH. Libtool adds the build directory to the search path, which is
344363
# not necessary --- and even harmful --- for the binary packages we release.
345364
function clean_RPATH() {
365+
if [ `uname -s` = "Darwin" ]; then
366+
return
367+
fi
346368
local InstallPath="$1"
347369
for Candidate in `find $InstallPath/{bin,lib} -type f`; do
348370
if file $Candidate | grep ELF | egrep 'executable|shared object' > /dev/null 2>&1 ; then
@@ -355,6 +377,16 @@ function clean_RPATH() {
355377
done
356378
}
357379

380+
# Create a package of the release binaries.
381+
function package_release() {
382+
cwd=`pwd`
383+
cd $BuildDir/Phase3/Release
384+
mv llvmCore-$Release-$RC.install $Package
385+
tar cfz $BuildDir/$Package.tar.gz $Package
386+
mv $Package llvmCore-$Release-$RC.install
387+
cd $cwd
388+
}
389+
358390
set -e # Exit if any command fails
359391

360392
if [ "$do_checkout" = "yes" ]; then
@@ -550,9 +582,12 @@ for Flavor in $Flavors ; do
550582
done
551583
) 2>&1 | tee $LogDir/testing.$Release-$RC.log
552584

585+
package_release
586+
553587
set +e
554588

555589
# Woo hoo!
556590
echo "### Testing Finished ###"
591+
echo "### Package: $Package.tar.gz"
557592
echo "### Logs: $LogDir"
558593
exit 0

0 commit comments

Comments
 (0)