[Lldb-commits] [lldb] [lldb] Add CMake dependency tracking for SBLanguages generation script (PR #91686)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 17:39:39 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Alex Langford (bulbazord)
<details>
<summary>Changes</summary>
If you change the generation script and re-run ninja (or whatever drives your build), it currently will not regenerate SBLanguages.h. With dependency tracking, it should re-run when the script changes.
---
Full diff: https://github.com/llvm/llvm-project/pull/91686.diff
1 Files Affected:
- (modified) lldb/source/API/CMakeLists.txt (+4-1)
``````````diff
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index aa31caddfde3a..76b42ecf63f91 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -23,14 +23,17 @@ endif()
# Generate SBLanguages.h from Dwarf.def.
set(sb_languages_file
${CMAKE_CURRENT_BINARY_DIR}/../../include/lldb/API/SBLanguages.h)
+set(sb_languages_generator
+ ${LLDB_SOURCE_DIR}/scripts/generate-sbapi-dwarf-enum.py)
add_custom_command(
COMMENT "Generating SBLanguages.h from Dwarf.def"
COMMAND "${Python3_EXECUTABLE}"
- ${LLDB_SOURCE_DIR}/scripts/generate-sbapi-dwarf-enum.py
+ ${sb_languages_generator}
${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
-o ${sb_languages_file}
OUTPUT ${sb_languages_file}
DEPENDS ${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
+ ${sb_languages_generator}
WORKING_DIRECTORY ${LLVM_LIBRARY_OUTPUT_INTDIR}
)
add_custom_target(lldb-sbapi-dwarf-enums
``````````
</details>
https://github.com/llvm/llvm-project/pull/91686
More information about the lldb-commits
mailing list