aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-07-04 13:59:25 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-07-04 13:59:25 +0000
commit60cbbb444091e3b13bca920c4e92a720fe930496 (patch)
treeefb38d92ad2821a10b99992d30bc06be1c0f129d
parent6a99ce27f690062586fa74928ad0988c71a5b5fa (diff)
downloadllvm-60cbbb444091e3b13bca920c4e92a720fe930496.zip
llvm-60cbbb444091e3b13bca920c4e92a720fe930496.tar.gz
llvm-60cbbb444091e3b13bca920c4e92a720fe930496.tar.bz2
[CMake] Move some variables around
This improves consistency by creating a CMake variable for the dsymutil path. The motivation is that for Swift, the dsymutil binary and the lldb binary live in different directories and we need an option to configure this from the build script. llvm-svn: 336272
-rw-r--r--lldb/CMakeLists.txt12
-rw-r--r--lldb/test/CMakeLists.txt4
2 files changed, 13 insertions, 3 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index a5e0cae..1d67a73 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -88,6 +88,10 @@ option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests."
option(LLDB_TEST_USE_CUSTOM_C_COMPILER "Use the C compiler provided via LLDB_TEST_C_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
option(LLDB_TEST_USE_CUSTOM_CXX_COMPILER "Use the C++ compiler provided via LLDB_TEST_CXX_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
if(LLDB_INCLUDE_TESTS)
+
+ set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/lldb${CMAKE_EXECUTABLE_SUFFIX}")
+ set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")
+
if (NOT LLDB_TEST_USE_CUSTOM_C_COMPILER AND TARGET clang)
set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
@@ -100,8 +104,10 @@ if(LLDB_INCLUDE_TESTS)
set(LLDB_DEFAULT_TEST_CXX_COMPILER "")
endif()
+ set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
set(LLDB_TEST_C_COMPILER "${LLDB_DEFAULT_TEST_C_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
set(LLDB_TEST_CXX_COMPILER "${LLDB_DEFAULT_TEST_CXX_COMPILER}" CACHE PATH "C++ Compiler to use for building LLDB test inferiors")
+ set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
@@ -130,7 +136,7 @@ if(LLDB_INCLUDE_TESTS)
endif()
if(NOT LLDB_BUILT_STANDALONE)
- list(APPEND LLDB_TEST_DEPS yaml2obj dsymutil)
+ list(APPEND LLDB_TEST_DEPS yaml2obj)
endif()
if(TARGET liblldb)
@@ -141,6 +147,10 @@ if(LLDB_INCLUDE_TESTS)
list(APPEND LLDB_TEST_DEPS clang)
endif()
+ if(TARGET dsymutil)
+ list(APPEND LLDB_TEST_DEPS dsymutil)
+ endif()
+
add_subdirectory(test)
add_subdirectory(unittests)
add_subdirectory(lit)
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 463c147..de548f0 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -47,8 +47,8 @@ set(LLDB_TEST_COMMON_ARGS
)
list(APPEND LLDB_TEST_COMMON_ARGS
- --executable ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXECUTABLE_SUFFIX}
- --dsymutil ${LLVM_RUNTIME_OUTPUT_INTDIR}/dsymutil${CMAKE_EXECUTABLE_SUFFIX}
+ --executable ${LLDB_TEST_EXECUTABLE}
+ --dsymutil ${LLDB_TEST_DSYMUTIL}
-C ${LLDB_TEST_C_COMPILER}
)