[Lldb-commits] [lldb] r336272 - [CMake] Move some variables around

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 4 06:59:25 PDT 2018


Author: jdevlieghere
Date: Wed Jul  4 06:59:25 2018
New Revision: 336272

URL: http://llvm.org/viewvc/llvm-project?rev=336272&view=rev
Log:
[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.

Modified:
    lldb/trunk/CMakeLists.txt
    lldb/trunk/test/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=336272&r1=336271&r2=336272&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Wed Jul  4 06:59:25 2018
@@ -88,6 +88,10 @@ option(LLDB_INCLUDE_TESTS "Generate buil
 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)

Modified: lldb/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=336272&r1=336271&r2=336272&view=diff
==============================================================================
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Wed Jul  4 06:59:25 2018
@@ -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}
   )
 




More information about the lldb-commits mailing list