llvm.org GIT mirror llvm / 37d0604
Merging r243531: ------------------------------------------------------------------------ r243531 | hans | 2015-07-29 09:29:06 -0700 (Wed, 29 Jul 2015) | 7 lines 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/branches/release_37@243537 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 4 years ago
1 changed file(s) with 48 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3232 do_rt="yes"
3333 do_libs="yes"
3434 do_test_suite="yes"
35 do_openmp="no"
3536 BuildDir="`pwd`"
3637 use_autoconf="no"
3738 ExtraConfigureFlags=""
5556 echo " -no-rt Disable check-out & build Compiler-RT"
5657 echo " -no-libs Disable check-out & build libcxx/libcxxabi/libunwind"
5758 echo " -no-test-suite Disable check-out & build test-suite"
59 echo " -openmp Check out and build the OpenMP run-time (experimental)"
5860 }
5961
6062 if [ `uname -s` = "Darwin" ]; then
122124 -no-test-suite )
123125 do_test_suite="no"
124126 ;;
127 -openmp )
128 do_openmp="yes"
129 ;;
125130 -help | --help | -h | --h | -\? )
126131 usage
127132 exit 0
173178 fi
174179 if [ $do_test_suite = "yes" ]; then
175180 projects="$projects test-suite"
181 fi
182 if [ $do_openmp = "yes" ]; then
183 projects="$projects openmp"
176184 fi
177185
178186 # Go to the build directory (may be different from CWD)
410418 cd $cwd
411419 }
412420
421 # Build and package the OpenMP run-time. This is still experimental and not
422 # meant for official testing in the release, but as a way for providing
423 # binaries as a convenience to those who want to try it out.
424 function build_OpenMP() {
425 cwd=`pwd`
426
427 rm -rf $BuildDir/Phase3/openmp
428 rm -rf $BuildDir/Phase3/openmp.install
429 mkdir -p $BuildDir/Phase3/openmp
430 cd $BuildDir/Phase3/openmp
431 clang=$BuildDir/Phase3/Release/llvmCore-$Release-$RC.install/usr/local/bin/clang
432
433 echo "#" cmake -DCMAKE_C_COMPILER=${clang} -DCMAKE_CXX_COMPILER=${clang}++ \
434 -DCMAKE_BUILD_TYPE=Release -DLIBOMP_MICRO_TESTS=on \
435 $BuildDir/openmp.src/runtime
436 cmake -DCMAKE_C_COMPILER=${clang} -DCMAKE_CXX_COMPILER=${clang}++ \
437 -DCMAKE_BUILD_TYPE=Release -DLIBOMP_MICRO_TESTS=on \
438 $BuildDir/openmp.src/runtime
439
440 echo "# Building OpenMP run-time"
441 echo "# ${MAKE} -j $NumJobs VERBOSE=1"
442 ${MAKE} -j $NumJobs VERBOSE=1
443 echo "# ${MAKE} libomp-micro-tests VERBOSE=1"
444 ${MAKE} libomp-micro-tests VERBOSE=1
445 echo "# ${MAKE} install DESTDIR=$BuildDir/Phase3/openmp.install"
446 ${MAKE} install DESTDIR=$BuildDir/Phase3/openmp.install
447
448 OpenMPPackage=OpenMP-$Triple
449 mv $BuildDir/Phase3/openmp.install/usr/local $BuildDir/$OpenMPPackage
450 cd $BuildDir
451 tar cvfJ $BuildDir/$OpenMPPackage.tar.xz $OpenMPPackage
452 mv $OpenMPPackage $BuildDir/Phase3/openmp.install/usr/local
453 cd $cwd
454 }
455
413456 # Exit if any command fails
414457 # Note: pipefail is necessary for running build commands through
415458 # a pipe (i.e. it changes the output of ``false | tee /dev/null ; echo $?``)
442485
443486 c_compiler="$CC"
444487 cxx_compiler="$CXX"
445
446488 llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.obj
447489 llvmCore_phase1_destdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.install
448490
521563 done
522564 fi
523565 done
566
567 if [ $do_openmp = "yes" ]; then
568 build_OpenMP
569 fi
570
524571 ) 2>&1 | tee $LogDir/testing.$Release-$RC.log
525572
526573 package_release