diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 19:56:11 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 19:56:11 +0000 |
commit | ca82c85029ae0befb17bc14a4faa9f3d51dd72b3 (patch) | |
tree | 2df9dea922feef454abe6d1499112a4abc270079 /gnu/llvm/utils/release | |
parent | 04c0d479b956b5e4f4e20ce989b95443aa03da0b (diff) |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/utils/release')
-rwxr-xr-x | gnu/llvm/utils/release/build_llvm_package.bat | 8 | ||||
-rwxr-xr-x | gnu/llvm/utils/release/export.sh | 4 | ||||
-rwxr-xr-x | gnu/llvm/utils/release/merge.sh | 12 | ||||
-rwxr-xr-x | gnu/llvm/utils/release/tag.sh | 6 | ||||
-rwxr-xr-x | gnu/llvm/utils/release/test-release.sh | 85 |
5 files changed, 57 insertions, 58 deletions
diff --git a/gnu/llvm/utils/release/build_llvm_package.bat b/gnu/llvm/utils/release/build_llvm_package.bat index 830f25e5cf3..5542ca613f3 100755 --- a/gnu/llvm/utils/release/build_llvm_package.bat +++ b/gnu/llvm/utils/release/build_llvm_package.bat @@ -19,8 +19,8 @@ set PATH=%PATH%;c:\gnuwin32\bin set revision=%1
set branch=trunk
-set package_version=3.8.0-r%revision%
-set clang_format_vs_version=3.8.0.%revision%
+set package_version=3.9.0-r%revision%
+set clang_format_vs_version=3.9.0.%revision%
set build_dir=llvm_package_%revision%
echo Branch: %branch%
@@ -40,9 +40,11 @@ svn.exe export -r %revision% http://llvm.org/svn/llvm-project/cfe/%branch% llvm/ svn.exe export -r %revision% http://llvm.org/svn/llvm-project/clang-tools-extra/%branch% llvm/tools/clang/tools/extra || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/lld/%branch% llvm/tools/lld || exit /b
svn.exe export -r %revision% http://llvm.org/svn/llvm-project/compiler-rt/%branch% llvm/projects/compiler-rt || exit /b
+svn.exe export -r %revision% http://llvm.org/svn/llvm-project/openmp/%branch% llvm/projects/openmp || exit /b
-set cmake_flags=-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON -DLLVM_USE_CRT_RELEASE=MT -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% -DPACKAGE_VERSION=%package_version%
+REM Setting CMAKE_CL_SHOWINCLUDES_PREFIX to work around PR27226.
+set cmake_flags=-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON -DLLVM_USE_CRT_RELEASE=MT -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% -DPACKAGE_VERSION=%package_version% -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: "
REM TODO: Run all tests, including lld and compiler-rt.
diff --git a/gnu/llvm/utils/release/export.sh b/gnu/llvm/utils/release/export.sh index 2fd4206b740..d978055f018 100755 --- a/gnu/llvm/utils/release/export.sh +++ b/gnu/llvm/utils/release/export.sh @@ -20,7 +20,7 @@ base_url="https://llvm.org/svn/llvm-project" release="" rc="" -function usage() { +usage() { echo "Export the SVN sources and build tarballs from them" echo "usage: `basename $0`" echo " " @@ -29,7 +29,7 @@ function usage() { echo " -final The final tag" } -function export_sources() { +export_sources() { release_no_dot=`echo $release | sed -e 's,\.,,g'` tag_dir="tags/RELEASE_$release_no_dot/$rc" diff --git a/gnu/llvm/utils/release/merge.sh b/gnu/llvm/utils/release/merge.sh index cc3cda9d92f..b4893224834 100755 --- a/gnu/llvm/utils/release/merge.sh +++ b/gnu/llvm/utils/release/merge.sh @@ -17,12 +17,14 @@ set -e rev="" proj="" revert="no" +srcdir="" usage() { echo "usage: `basename $0` [OPTIONS]" echo " -proj PROJECT The project to merge the result into" echo " -rev NUM The revision to merge into the project" echo " -revert Revert rather than merge the commit" + echo " -srcdir The root of the project checkout" } while [ $# -gt 0 ]; do @@ -35,6 +37,10 @@ while [ $# -gt 0 ]; do shift proj=$1 ;; + --srcdir | -srcdir | -s) + shift + srcdir=$1 + ;; -h | -help | --help ) usage ;; @@ -51,6 +57,10 @@ while [ $# -gt 0 ]; do shift done +if [ -z "$srcdir" ]; then + srcdir="$proj.src" +fi + if [ "x$rev" = "x" -o "x$proj" = "x" ]; then echo "error: need to specify project and revision" echo @@ -72,7 +82,7 @@ else fi svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1 -cd $proj.src +cd "$srcdir" echo "# Updating tree" svn up diff --git a/gnu/llvm/utils/release/tag.sh b/gnu/llvm/utils/release/tag.sh index caefc7f7b71..c3e839d9323 100755 --- a/gnu/llvm/utils/release/tag.sh +++ b/gnu/llvm/utils/release/tag.sh @@ -23,7 +23,7 @@ revision="HEAD" base_url="https://llvm.org/svn/llvm-project" -function usage() { +usage() { echo "usage: `basename $0` -release <num> [-rebranch] [-revision <num>] [-dry-run]" echo "usage: `basename $0` -release <num> -rc <num> [-dry-run]" echo " " @@ -35,7 +35,7 @@ function usage() { echo " -dry-run Make no changes to the repository, just print the commands" } -function tag_version() { +tag_version() { set -x for proj in $projects; do if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then @@ -53,7 +53,7 @@ function tag_version() { set +x } -function tag_release_candidate() { +tag_release_candidate() { set -x for proj in $projects ; do if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then diff --git a/gnu/llvm/utils/release/test-release.sh b/gnu/llvm/utils/release/test-release.sh index 69de8371d63..b9cc38d35e2 100755 --- a/gnu/llvm/utils/release/test-release.sh +++ b/gnu/llvm/utils/release/test-release.sh @@ -12,7 +12,8 @@ # #===------------------------------------------------------------------------===# -if [ `uname -s` = "FreeBSD" ]; then +System=`uname -s` +if [ "$System" = "FreeBSD" ]; then MAKE=gmake else MAKE=make @@ -35,8 +36,8 @@ do_libs="yes" do_libunwind="yes" do_test_suite="yes" do_openmp="yes" +do_lldb="no" BuildDir="`pwd`" -use_autoconf="no" ExtraConfigureFlags="" ExportBranch="" @@ -55,7 +56,6 @@ function usage() { echo " -no-compare-files Don't test that phase 2 and 3 files are identical." echo " -use-gzip Use gzip instead of xz." echo " -configure-flags FLAGS Extra flags to pass to the configure step." - echo " -use-autoconf Use autoconf instead of cmake" echo " -svn-path DIR Use the specified DIR instead of a release." echo " For example -svn-path trunk or -svn-path branches/release_37" echo " -no-rt Disable check-out & build Compiler-RT" @@ -63,6 +63,8 @@ function usage() { echo " -no-libunwind Disable check-out & build libunwind" echo " -no-test-suite Disable check-out & build test-suite" echo " -no-openmp Disable check-out & build libomp" + echo " -lldb Enable check-out & build lldb" + echo " -no-lldb Disable check-out & build lldb (default)" } while [ $# -gt 0 ]; do @@ -123,9 +125,6 @@ while [ $# -gt 0 ]; do -use-gzip | --use-gzip ) use_gzip="yes" ;; - -use-autoconf | --use-autoconf ) - use_autoconf="yes" - ;; -no-rt ) do_rt="no" ;; @@ -141,6 +140,12 @@ while [ $# -gt 0 ]; do -no-openmp ) do_openmp="no" ;; + -lldb ) + do_lldb="yes" + ;; + -no-lldb ) + do_lldb="no" + ;; -help | --help | -h | --h | -\? ) usage exit 0 @@ -154,13 +159,11 @@ while [ $# -gt 0 ]; do shift done -if [ "$use_autoconf" = "no" ]; then - if [ "$do_test_suite" = "yes" ]; then - # See llvm.org/PR26146. - echo Skipping test-suite build when using CMake. - echo It will still be exported. - do_test_suite="export-only" - fi +if [ "$do_test_suite" = "yes" ]; then + # See llvm.org/PR26146. + echo Skipping test-suite build when using CMake. + echo It will still be exported. + do_test_suite="export-only" fi # Check required arguments. @@ -213,6 +216,9 @@ esac if [ $do_openmp = "yes" ]; then projects="$projects openmp" fi +if [ $do_lldb = "yes" ]; then + projects="$projects lldb" +fi # Go to the build directory (may be different from CWD) BuildDir=$BuildDir/$RC @@ -249,7 +255,7 @@ function check_program_exists() { fi } -if [ `uname -s` != "Darwin" ]; then +if [ "$System" != "Darwin" ]; then check_program_exists 'chrpath' check_program_exists 'file' check_program_exists 'objdump' @@ -279,6 +285,9 @@ function export_sources() { cfe) projsrc=llvm.src/tools/clang ;; + lldb) + projsrc=llvm.src/tools/$proj + ;; clang-tools-extra) projsrc=llvm.src/tools/clang/tools/extra ;; @@ -321,17 +330,14 @@ function configure_llvmCore() { Release ) BuildType="Release" Assertions="OFF" - ConfigureFlags="--enable-optimized --disable-assertions" ;; Release+Asserts ) BuildType="Release" Assertions="ON" - ConfigureFlags="--enable-optimized --enable-assertions" ;; Debug ) BuildType="Debug" Assertions="ON" - ConfigureFlags="--disable-optimized --enable-assertions" ;; * ) echo "# Invalid flavor '$Flavor'" @@ -346,29 +352,18 @@ function configure_llvmCore() { cd $ObjDir echo "# Configuring llvm $Release-$RC $Flavor" - if [ "$use_autoconf" = "yes" ]; then - echo "#" env CC="$c_compiler" CXX="$cxx_compiler" \ - $BuildDir/llvm.src/configure \ - $ConfigureFlags --disable-timestamps $ExtraConfigureFlags \ - 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log - env CC="$c_compiler" CXX="$cxx_compiler" \ - $BuildDir/llvm.src/configure \ - $ConfigureFlags --disable-timestamps $ExtraConfigureFlags \ - 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log - else - echo "#" env CC="$c_compiler" CXX="$cxx_compiler" \ - cmake -G "Unix Makefiles" \ - -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \ - -DLLVM_ENABLE_TIMESTAMPS=OFF -DLLVM_CONFIGTIME="(timestamp not enabled)" \ - $ExtraConfigureFlags $BuildDir/llvm.src \ - 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log - env CC="$c_compiler" CXX="$cxx_compiler" \ - cmake -G "Unix Makefiles" \ - -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \ - -DLLVM_ENABLE_TIMESTAMPS=OFF -DLLVM_CONFIGTIME="(timestamp not enabled)" \ - $ExtraConfigureFlags $BuildDir/llvm.src \ - 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log - fi + echo "#" env CC="$c_compiler" CXX="$cxx_compiler" \ + cmake -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \ + -DLLVM_CONFIGTIME="(timestamp not enabled)" \ + $ExtraConfigureFlags $BuildDir/llvm.src \ + 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log + env CC="$c_compiler" CXX="$cxx_compiler" \ + cmake -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \ + -DLLVM_CONFIGTIME="(timestamp not enabled)" \ + $ExtraConfigureFlags $BuildDir/llvm.src \ + 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log cd $BuildDir } @@ -404,21 +399,13 @@ function test_llvmCore() { deferred_error $Phase $Flavor "check-all failed" fi - if [ "$use_autoconf" = "yes" ]; then - # In the cmake build, unit tests are run as part of check-all. - if ! ( ${MAKE} -k unittests 2>&1 | \ - tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log ) ; then - deferred_error $Phase $Flavor "unittests failed" - fi - fi - cd $BuildDir } # Clean RPATH. Libtool adds the build directory to the search path, which is # not necessary --- and even harmful --- for the binary packages we release. function clean_RPATH() { - if [ `uname -s` = "Darwin" ]; then + if [ "$System" = "Darwin" ]; then return fi local InstallPath="$1" |