forked from OSchip/llvm-project
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. llvm-svn: 195193
This commit is contained in:
parent
d895e29e88
commit
d607384d88
|
@ -26,6 +26,7 @@ Base_url="http://llvm.org/svn/llvm-project"
|
||||||
Release=""
|
Release=""
|
||||||
Release_no_dot=""
|
Release_no_dot=""
|
||||||
RC=""
|
RC=""
|
||||||
|
Triple=""
|
||||||
do_checkout="yes"
|
do_checkout="yes"
|
||||||
do_ada="no"
|
do_ada="no"
|
||||||
do_clang="yes"
|
do_clang="yes"
|
||||||
|
@ -44,6 +45,7 @@ function usage() {
|
||||||
echo " -release X.Y The release number to test."
|
echo " -release X.Y The release number to test."
|
||||||
echo " -rc NUM The pre-release candidate number."
|
echo " -rc NUM The pre-release candidate number."
|
||||||
echo " -final The final release candidate."
|
echo " -final The final release candidate."
|
||||||
|
echo " -triple TRIPLE The target triple for this machine."
|
||||||
echo " -j NUM Number of compile jobs to run. [default: 3]"
|
echo " -j NUM Number of compile jobs to run. [default: 3]"
|
||||||
echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
|
echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
|
||||||
echo " -no-checkout Don't checkout the sources from SVN."
|
echo " -no-checkout Don't checkout the sources from SVN."
|
||||||
|
@ -72,6 +74,10 @@ while [ $# -gt 0 ]; do
|
||||||
-final | --final )
|
-final | --final )
|
||||||
RC=final
|
RC=final
|
||||||
;;
|
;;
|
||||||
|
-triple | --triple )
|
||||||
|
shift
|
||||||
|
Triple="$1"
|
||||||
|
;;
|
||||||
-j* )
|
-j* )
|
||||||
NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
|
NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
|
||||||
if [ -z "$NumJobs" ]; then
|
if [ -z "$NumJobs" ]; then
|
||||||
|
@ -135,6 +141,10 @@ if [ -z "$RC" ]; then
|
||||||
echo "error: no release candidate number specified"
|
echo "error: no release candidate number specified"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$Triple" ]; then
|
||||||
|
echo "error: no target triple specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Figure out how many make processes to run.
|
# Figure out how many make processes to run.
|
||||||
if [ -z "$NumJobs" ]; then
|
if [ -z "$NumJobs" ]; then
|
||||||
|
@ -159,6 +169,13 @@ cd $BuildDir
|
||||||
LogDir=$BuildDir/logs
|
LogDir=$BuildDir/logs
|
||||||
mkdir -p $LogDir
|
mkdir -p $LogDir
|
||||||
|
|
||||||
|
# Final package name.
|
||||||
|
Package=clang+llvm-$Release
|
||||||
|
if [ $RC != "final" ]; then
|
||||||
|
Package=$Package-$RC
|
||||||
|
fi
|
||||||
|
Package=$Package-$Triple
|
||||||
|
|
||||||
# Find compilers.
|
# Find compilers.
|
||||||
if [ "$do_dragonegg" = "yes" ]; then
|
if [ "$do_dragonegg" = "yes" ]; then
|
||||||
gcc_compiler="$GCC"
|
gcc_compiler="$GCC"
|
||||||
|
@ -189,9 +206,11 @@ function check_program_exists() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_program_exists 'chrpath'
|
if [ `uname -s` != "Darwin" ]; then
|
||||||
check_program_exists 'file'
|
check_program_exists 'chrpath'
|
||||||
check_program_exists 'objdump'
|
check_program_exists 'file'
|
||||||
|
check_program_exists 'objdump'
|
||||||
|
fi
|
||||||
|
|
||||||
# Make sure that the URLs are valid.
|
# Make sure that the URLs are valid.
|
||||||
function check_valid_urls() {
|
function check_valid_urls() {
|
||||||
|
@ -343,6 +362,9 @@ function test_llvmCore() {
|
||||||
# Clean RPATH. Libtool adds the build directory to the search path, which is
|
# Clean RPATH. Libtool adds the build directory to the search path, which is
|
||||||
# not necessary --- and even harmful --- for the binary packages we release.
|
# not necessary --- and even harmful --- for the binary packages we release.
|
||||||
function clean_RPATH() {
|
function clean_RPATH() {
|
||||||
|
if [ `uname -s` = "Darwin" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
local InstallPath="$1"
|
local InstallPath="$1"
|
||||||
for Candidate in `find $InstallPath/{bin,lib} -type f`; do
|
for Candidate in `find $InstallPath/{bin,lib} -type f`; do
|
||||||
if file $Candidate | grep ELF | egrep 'executable|shared object' > /dev/null 2>&1 ; then
|
if file $Candidate | grep ELF | egrep 'executable|shared object' > /dev/null 2>&1 ; then
|
||||||
|
@ -355,6 +377,16 @@ function clean_RPATH() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Create a package of the release binaries.
|
||||||
|
function package_release() {
|
||||||
|
cwd=`pwd`
|
||||||
|
cd $BuildDir/Phase3/Release
|
||||||
|
mv llvmCore-$Release-$RC.install $Package
|
||||||
|
tar cfz $BuildDir/$Package.tar.gz $Package
|
||||||
|
mv $Package llvmCore-$Release-$RC.install
|
||||||
|
cd $cwd
|
||||||
|
}
|
||||||
|
|
||||||
set -e # Exit if any command fails
|
set -e # Exit if any command fails
|
||||||
|
|
||||||
if [ "$do_checkout" = "yes" ]; then
|
if [ "$do_checkout" = "yes" ]; then
|
||||||
|
@ -550,9 +582,12 @@ for Flavor in $Flavors ; do
|
||||||
done
|
done
|
||||||
) 2>&1 | tee $LogDir/testing.$Release-$RC.log
|
) 2>&1 | tee $LogDir/testing.$Release-$RC.log
|
||||||
|
|
||||||
|
package_release
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
# Woo hoo!
|
# Woo hoo!
|
||||||
echo "### Testing Finished ###"
|
echo "### Testing Finished ###"
|
||||||
|
echo "### Package: $Package.tar.gz"
|
||||||
echo "### Logs: $LogDir"
|
echo "### Logs: $LogDir"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue