Skip to content

Commit f226aaf

Browse files
committedDec 4, 2014
test-release.sh: Add a way to specify --build to configure
Summary: I currently have to specify --build=mips-linux-gnu or --build=mipsel-linux-gnu to configure in order to successfully recurse a 32-bit build of the compiler on my mips64-linux-gnu and mips64el-linux-gnu targets. This is a bug and will be fixed but in the meantime it will be useful to have a way to work around this. Reviewers: tstellarAMD Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6522 llvm-svn: 223369
1 parent c0610bf commit f226aaf

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed
 

‎llvm/utils/release/test-release.sh

+29-18
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,30 @@ do_debug="no"
3939
do_asserts="no"
4040
do_compare="yes"
4141
BuildDir="`pwd`"
42+
BuildTriple=""
4243

4344
function usage() {
4445
echo "usage: `basename $0` -release X.Y -rc NUM [OPTIONS]"
4546
echo ""
46-
echo " -release X.Y The release number to test."
47-
echo " -rc NUM The pre-release candidate number."
48-
echo " -final The final release candidate."
49-
echo " -triple TRIPLE The target triple for this machine."
50-
echo " -j NUM Number of compile jobs to run. [default: 3]"
51-
echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
52-
echo " -no-checkout Don't checkout the sources from SVN."
53-
echo " -no-64bit Don't test the 64-bit version. [default: yes]"
54-
echo " -enable-ada Build Ada. [default: disable]"
55-
echo " -disable-clang Do not test clang. [default: enable]"
56-
echo " -enable-dragonegg Test dragonegg. [default: disable]"
57-
echo " -enable-fortran Enable Fortran build. [default: disable]"
58-
echo " -disable-objc Disable ObjC build. [default: enable]"
59-
echo " -test-debug Test the debug build. [default: no]"
60-
echo " -test-asserts Test with asserts on. [default: no]"
61-
echo " -no-compare-files Don't test that phase 2 and 3 files are identical."
62-
echo " -use-gzip Use gzip instead of xz."
47+
echo " -release X.Y The release number to test."
48+
echo " -rc NUM The pre-release candidate number."
49+
echo " -final The final release candidate."
50+
echo " -triple TRIPLE The target triple for this machine."
51+
echo " -j NUM Number of compile jobs to run. [default: 3]"
52+
echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
53+
echo " -no-checkout Don't checkout the sources from SVN."
54+
echo " -no-64bit Don't test the 64-bit version. [default: yes]"
55+
echo " -enable-ada Build Ada. [default: disable]"
56+
echo " -disable-clang Do not test clang. [default: enable]"
57+
echo " -enable-dragonegg Test dragonegg. [default: disable]"
58+
echo " -enable-fortran Enable Fortran build. [default: disable]"
59+
echo " -disable-objc Disable ObjC build. [default: enable]"
60+
echo " -test-debug Test the debug build. [default: no]"
61+
echo " -test-asserts Test with asserts on. [default: no]"
62+
echo " -no-compare-files Don't test that phase 2 and 3 files are identical."
63+
echo " -use-gzip Use gzip instead of xz."
64+
echo " -build-triple TRIPLE The build triple for this machine"
65+
echo " [default: use config.guess]"
6366
}
6467

6568
while [ $# -gt 0 ]; do
@@ -80,6 +83,10 @@ while [ $# -gt 0 ]; do
8083
shift
8184
Triple="$1"
8285
;;
86+
-build-triple | --build-triple )
87+
shift
88+
BuildTriple="$1"
89+
;;
8390
-j* )
8491
NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
8592
if [ -z "$NumJobs" ]; then
@@ -295,17 +302,21 @@ function configure_llvmCore() {
295302
echo "# Using C compiler: $c_compiler"
296303
echo "# Using C++ compiler: $cxx_compiler"
297304

305+
build_triple_option="${BuildTriple:+--build=$BuildTriple}"
306+
298307
cd $ObjDir
299308
echo "# Configuring llvm $Release-$RC $Flavor"
300309
echo "# $BuildDir/llvm.src/configure --prefix=$InstallDir \
301310
--enable-optimized=$Optimized \
302311
--enable-assertions=$Assertions \
303-
--disable-timestamps"
312+
--disable-timestamps \
313+
$build_triple_option"
304314
env CC="$c_compiler" CXX="$cxx_compiler" \
305315
$BuildDir/llvm.src/configure --prefix=$InstallDir \
306316
--enable-optimized=$Optimized \
307317
--enable-assertions=$Assertions \
308318
--disable-timestamps \
319+
$build_triple_option \
309320
2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
310321
cd $BuildDir
311322
}

0 commit comments

Comments
 (0)
Please sign in to comment.