[Lldb-commits] [lldb] 733923a - [lldb\utils] Place lldb-repro in a per-configuration directory to support multi-configuration generators
Stella Stamenova via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 6 12:32:05 PST 2020
Author: Stella Stamenova
Date: 2020-02-06T12:31:57-08:00
New Revision: 733923a97dff2d2c6096d6b17c3987421be69ab6
URL: https://github.com/llvm/llvm-project/commit/733923a97dff2d2c6096d6b17c3987421be69ab6
DIFF: https://github.com/llvm/llvm-project/commit/733923a97dff2d2c6096d6b17c3987421be69ab6.diff
LOG: [lldb\utils] Place lldb-repro in a per-configuration directory to support multi-configuration generators
Summary: Currently, lldb-repro is placed in the wrong location for multi-configuration generators. For example, in the case of VS, it is placed in a directory $(Configuration) instead of in each of Debug, Release, etc.
Reviewers: JDevlieghere
Reviewed By: JDevlieghere
Subscribers: mgorny, lldb-commits, asmith
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74148
Added:
Modified:
lldb/utils/lldb-dotest/CMakeLists.txt
lldb/utils/lldb-repro/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/utils/lldb-dotest/CMakeLists.txt b/lldb/utils/lldb-dotest/CMakeLists.txt
index 21fedc6f650c..7359613d7fb9 100644
--- a/lldb/utils/lldb-dotest/CMakeLists.txt
+++ b/lldb/utils/lldb-dotest/CMakeLists.txt
@@ -53,7 +53,7 @@ if(LLDB_BUILT_STANDALONE)
endforeach()
elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
foreach(LLVM_BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
- string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_DIR_CONFIGURED ${LLVM_RUNTIME_OUTPUT_INTDIR})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_ARGS_CONFIGURED "${LLDB_DOTEST_ARGS}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_SOURCE_DIR_CONFIGURED "${LLDB_SOURCE_DIR}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_BUILD_DIRECTORY_CONFIGURED "${LLDB_TEST_BUILD_DIRECTORY}")
@@ -65,7 +65,7 @@ elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
configure_file(
lldb-dotest.in
- ${LLDB_DOTEST_DIR_CONFIGURED}/lldb-dotest
+ ${LLDB_DOTEST_DIR}/lldb-dotest
)
endforeach()
else()
diff --git a/lldb/utils/lldb-repro/CMakeLists.txt b/lldb/utils/lldb-repro/CMakeLists.txt
index 0bfcaaa0062e..a496e9986199 100644
--- a/lldb/utils/lldb-repro/CMakeLists.txt
+++ b/lldb/utils/lldb-repro/CMakeLists.txt
@@ -1,4 +1,23 @@
add_custom_target(lldb-repro)
add_dependencies(lldb-repro lldb-test-deps)
set_target_properties(lldb-repro PROPERTIES FOLDER "lldb utils")
-configure_file(lldb-repro.py ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-repro COPYONLY)
+
+# Generate lldb-repro Python script for each build mode.
+if(LLDB_BUILT_STANDALONE)
+ set(config_types ".")
+ if(CMAKE_CONFIGURATION_TYPES)
+ set(config_types ${CMAKE_CONFIGURATION_TYPES})
+ endif()
+
+ foreach(config_type ${config_types})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} config_runtime_output_dir ${LLVM_RUNTIME_OUTPUT_INTDIR})
+ configure_file(lldb-repro.py ${config_runtime_output_dir}/lldb-repro COPYONLY)
+ endforeach()
+elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+ foreach(LLVM_BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_REPRO_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+ configure_file(lldb-repro.py ${LLDB_REPRO_DIR}/lldb-repro COPYONLY)
+ endforeach()
+else()
+ configure_file(lldb-repro.py ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-repro COPYONLY)
+endif()
More information about the lldb-commits
mailing list