@@ -39,27 +39,30 @@ do_debug="no"
39
39
do_asserts=" no"
40
40
do_compare=" yes"
41
41
BuildDir=" ` pwd` "
42
+ BuildTriple=" "
42
43
43
44
function usage() {
44
45
echo " usage: ` basename $0 ` -release X.Y -rc NUM [OPTIONS]"
45
46
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]"
63
66
}
64
67
65
68
while [ $# -gt 0 ]; do
@@ -80,6 +83,10 @@ while [ $# -gt 0 ]; do
80
83
shift
81
84
Triple=" $1 "
82
85
;;
86
+ -build-triple | --build-triple )
87
+ shift
88
+ BuildTriple=" $1 "
89
+ ;;
83
90
-j* )
84
91
NumJobs=" ` echo $1 | sed -e ' s,-j\([0-9]*\),\1,g' ` "
85
92
if [ -z " $NumJobs " ]; then
@@ -295,17 +302,21 @@ function configure_llvmCore() {
295
302
echo " # Using C compiler: $c_compiler "
296
303
echo " # Using C++ compiler: $cxx_compiler "
297
304
305
+ build_triple_option=" ${BuildTriple: +--build=$BuildTriple } "
306
+
298
307
cd $ObjDir
299
308
echo " # Configuring llvm $Release -$RC $Flavor "
300
309
echo " # $BuildDir /llvm.src/configure --prefix=$InstallDir \
301
310
--enable-optimized=$Optimized \
302
311
--enable-assertions=$Assertions \
303
- --disable-timestamps"
312
+ --disable-timestamps \
313
+ $build_triple_option "
304
314
env CC=" $c_compiler " CXX=" $cxx_compiler " \
305
315
$BuildDir /llvm.src/configure --prefix=$InstallDir \
306
316
--enable-optimized=$Optimized \
307
317
--enable-assertions=$Assertions \
308
318
--disable-timestamps \
319
+ $build_triple_option \
309
320
2>&1 | tee $LogDir /llvm.configure-Phase$Phase -$Flavor .log
310
321
cd $BuildDir
311
322
}
0 commit comments