From a322a4af1fe8b989fe5d1bbc15de8736a26c03ca Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 13 Feb 2016 14:57:10 +0000 Subject: Vendor import of llvm release_38 branch r260756: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260756 --- utils/release/test-release.sh | 26 +++++++++++++++++++------- utils/unittest/CMakeLists.txt | 7 +++---- utils/unittest/UnitTestMain/CMakeLists.txt | 4 +++- 3 files changed, 25 insertions(+), 12 deletions(-) (limited to 'utils') diff --git a/utils/release/test-release.sh b/utils/release/test-release.sh index c5fe631da998..69de8371d631 100755 --- a/utils/release/test-release.sh +++ b/utils/release/test-release.sh @@ -155,9 +155,12 @@ while [ $# -gt 0 ]; do done if [ "$use_autoconf" = "no" ]; then - # See llvm.org/PR26146. - echo Skipping test-suite when using CMake. - do_test_suite="no" + 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 fi # Check required arguments. @@ -202,9 +205,11 @@ if [ $do_libs = "yes" ]; then projects="$projects libunwind" fi fi -if [ $do_test_suite = "yes" ]; then - projects="$projects test-suite" -fi +case $do_test_suite in + yes|export-only) + projects="$projects test-suite" + ;; +esac if [ $do_openmp = "yes" ]; then projects="$projects openmp" fi @@ -277,9 +282,16 @@ function export_sources() { clang-tools-extra) projsrc=llvm.src/tools/clang/tools/extra ;; - compiler-rt|libcxx|libcxxabi|libunwind|openmp|test-suite) + compiler-rt|libcxx|libcxxabi|libunwind|openmp) projsrc=llvm.src/projects/$proj ;; + test-suite) + if [ $do_test_suite = 'yes' ]; then + projsrc=llvm.src/projects/$proj + else + projsrc=$proj.src + fi + ;; *) echo "error: unknown project $proj" exit 1 diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index b34e22ae0cb4..c9a2cdd45c8e 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -32,10 +32,6 @@ if (NOT LLVM_ENABLE_THREADS) add_definitions( -DGTEST_HAS_PTHREAD=0 ) endif() -set(LIBS - LLVMSupport # Depends on llvm::raw_ostream -) - find_library(PTHREAD_LIBRARY_PATH pthread) if (PTHREAD_LIBRARY_PATH) list(APPEND LIBS pthread) @@ -46,6 +42,9 @@ add_llvm_library(gtest LINK_LIBS ${LIBS} + + LINK_COMPONENTS + Support # Depends on llvm::raw_ostream ) add_subdirectory(UnitTestMain) diff --git a/utils/unittest/UnitTestMain/CMakeLists.txt b/utils/unittest/UnitTestMain/CMakeLists.txt index 65ef97b02816..520db4e8d2b3 100644 --- a/utils/unittest/UnitTestMain/CMakeLists.txt +++ b/utils/unittest/UnitTestMain/CMakeLists.txt @@ -3,5 +3,7 @@ add_llvm_library(gtest_main LINK_LIBS gtest - LLVMSupport # Depends on llvm::cl + + LINK_COMPONENTS + Support # Depends on llvm::cl ) -- cgit v1.3