Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit c3a9cb5

Browse files
committed
test-release.sh: Add option for building the OpenMP run-time
This isn't part of the official release process, but provides a convenient way to build binaries for those who want to experiment with it. Hopefully the run- time can be part of the regular build and release process for 3.8. Differential Revision: http://reviews.llvm.org/D11494 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243531 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a229846 commit c3a9cb5

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

utils/release/test-release.sh

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ do_compare="yes"
3333
do_rt="yes"
3434
do_libs="yes"
3535
do_test_suite="yes"
36+
do_openmp="no"
3637
BuildDir="`pwd`"
3738
use_autoconf="no"
3839
ExtraConfigureFlags=""
@@ -59,6 +60,7 @@ function usage() {
5960
echo " -no-rt Disable check-out & build Compiler-RT"
6061
echo " -no-libs Disable check-out & build libcxx/libcxxabi/libunwind"
6162
echo " -no-test-suite Disable check-out & build test-suite"
63+
echo " -openmp Check out and build the OpenMP run-time (experimental)"
6264
}
6365

6466
if [ `uname -s` = "Darwin" ]; then
@@ -136,6 +138,9 @@ while [ $# -gt 0 ]; do
136138
-no-test-suite )
137139
do_test_suite="no"
138140
;;
141+
-openmp )
142+
do_openmp="yes"
143+
;;
139144
-help | --help | -h | --h | -\? )
140145
usage
141146
exit 0
@@ -191,6 +196,9 @@ fi
191196
if [ $do_test_suite = "yes" ]; then
192197
projects="$projects test-suite"
193198
fi
199+
if [ $do_openmp = "yes" ]; then
200+
projects="$projects openmp"
201+
fi
194202

195203
# Go to the build directory (may be different from CWD)
196204
BuildDir=$BuildDir/$RC
@@ -427,6 +435,41 @@ function package_release() {
427435
cd $cwd
428436
}
429437

438+
# Build and package the OpenMP run-time. This is still experimental and not
439+
# meant for official testing in the release, but as a way for providing
440+
# binaries as a convenience to those who want to try it out.
441+
function build_OpenMP() {
442+
cwd=`pwd`
443+
444+
rm -rf $BuildDir/Phase3/openmp
445+
rm -rf $BuildDir/Phase3/openmp.install
446+
mkdir -p $BuildDir/Phase3/openmp
447+
cd $BuildDir/Phase3/openmp
448+
clang=$BuildDir/Phase3/Release/llvmCore-$Release-$RC.install/usr/local/bin/clang
449+
450+
echo "#" cmake -DCMAKE_C_COMPILER=${clang} -DCMAKE_CXX_COMPILER=${clang}++ \
451+
-DCMAKE_BUILD_TYPE=Release -DLIBOMP_MICRO_TESTS=on \
452+
$BuildDir/openmp.src/runtime
453+
cmake -DCMAKE_C_COMPILER=${clang} -DCMAKE_CXX_COMPILER=${clang}++ \
454+
-DCMAKE_BUILD_TYPE=Release -DLIBOMP_MICRO_TESTS=on \
455+
$BuildDir/openmp.src/runtime
456+
457+
echo "# Building OpenMP run-time"
458+
echo "# ${MAKE} -j $NumJobs VERBOSE=1"
459+
${MAKE} -j $NumJobs VERBOSE=1
460+
echo "# ${MAKE} libomp-micro-tests VERBOSE=1"
461+
${MAKE} libomp-micro-tests VERBOSE=1
462+
echo "# ${MAKE} install DESTDIR=$BuildDir/Phase3/openmp.install"
463+
${MAKE} install DESTDIR=$BuildDir/Phase3/openmp.install
464+
465+
OpenMPPackage=OpenMP-$Triple
466+
mv $BuildDir/Phase3/openmp.install/usr/local $BuildDir/$OpenMPPackage
467+
cd $BuildDir
468+
tar cvfJ $BuildDir/$OpenMPPackage.tar.xz $OpenMPPackage
469+
mv $OpenMPPackage $BuildDir/Phase3/openmp.install/usr/local
470+
cd $cwd
471+
}
472+
430473
# Exit if any command fails
431474
# Note: pipefail is necessary for running build commands through
432475
# a pipe (i.e. it changes the output of ``false | tee /dev/null ; echo $?``)
@@ -459,7 +502,6 @@ for Flavor in $Flavors ; do
459502

460503
c_compiler="$CC"
461504
cxx_compiler="$CXX"
462-
463505
llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.obj
464506
llvmCore_phase1_destdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.install
465507

@@ -538,6 +580,11 @@ for Flavor in $Flavors ; do
538580
done
539581
fi
540582
done
583+
584+
if [ $do_openmp = "yes" ]; then
585+
build_OpenMP
586+
fi
587+
541588
) 2>&1 | tee $LogDir/testing.$Release-$RC.log
542589

543590
package_release

0 commit comments

Comments
 (0)