[Lldb-commits] [lldb] fd4b5f4 - [lldb] Add CMake dependency tracking for SBLanguages generation script (#91686)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 13 12:32:19 PDT 2024
Author: Alex Langford
Date: 2024-05-13T12:32:16-07:00
New Revision: fd4b5f4b52e414bb6fee7c906a22867891fb46b5
URL: https://github.com/llvm/llvm-project/commit/fd4b5f4b52e414bb6fee7c906a22867891fb46b5
DIFF: https://github.com/llvm/llvm-project/commit/fd4b5f4b52e414bb6fee7c906a22867891fb46b5.diff
LOG: [lldb] Add CMake dependency tracking for SBLanguages generation script (#91686)
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.
Added:
Modified:
lldb/source/API/CMakeLists.txt
Removed:
################################################################################
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
More information about the lldb-commits
mailing list