[Lldb-commits] [lldb] [lldb] Use add_custom_command for SBLanguages.h (PR #91254)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 6 11:52:21 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Jonas Devlieghere (JDevlieghere)
<details>
<summary>Changes</summary>
Use add_custom_command instead of add_custom_target to generate SBLanguages.h.
---
Full diff: https://github.com/llvm/llvm-project/pull/91254.diff
1 Files Affected:
- (modified) lldb/source/API/CMakeLists.txt (+5-7)
``````````diff
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index a64c0d4a333425..798a92874f13d1 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -23,13 +23,13 @@ endif()
# Target to generate SBLanguages.h from Dwarf.def.
set(sb_languages_file
${CMAKE_CURRENT_BINARY_DIR}/../../include/lldb/API/SBLanguages.h)
-add_custom_target(
- lldb-sbapi-dwarf-enums
- "${Python3_EXECUTABLE}"
+add_custom_command(
+ COMMENT "Generating SBLanguages.h from Dwarf.def"
+ COMMAND "${Python3_EXECUTABLE}"
${LLDB_SOURCE_DIR}/scripts/generate-sbapi-dwarf-enum.py
${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
-o ${sb_languages_file}
- BYPRODUCTS ${sb_languages_file}
+ OUTPUT ${sb_languages_file}
DEPENDS ${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
WORKING_DIRECTORY ${LLVM_LIBRARY_OUTPUT_INTDIR}
)
@@ -113,9 +113,7 @@ add_lldb_library(liblldb SHARED ${option_framework}
SystemInitializerFull.cpp
${lldb_python_wrapper}
${lldb_lua_wrapper}
-
- DEPENDS
- lldb-sbapi-dwarf-enums
+ ${sb_languages_file}
LINK_LIBS
lldbBreakpoint
``````````
</details>
https://github.com/llvm/llvm-project/pull/91254
More information about the lldb-commits
mailing list