Skip to content

Commit fd4b5f4

Browse files
authored
[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.
1 parent 54b17fa commit fd4b5f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ endif()
2323
# Generate SBLanguages.h from Dwarf.def.
2424
set(sb_languages_file
2525
${CMAKE_CURRENT_BINARY_DIR}/../../include/lldb/API/SBLanguages.h)
26+
set(sb_languages_generator
27+
${LLDB_SOURCE_DIR}/scripts/generate-sbapi-dwarf-enum.py)
2628
add_custom_command(
2729
COMMENT "Generating SBLanguages.h from Dwarf.def"
2830
COMMAND "${Python3_EXECUTABLE}"
29-
${LLDB_SOURCE_DIR}/scripts/generate-sbapi-dwarf-enum.py
31+
${sb_languages_generator}
3032
${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
3133
-o ${sb_languages_file}
3234
OUTPUT ${sb_languages_file}
3335
DEPENDS ${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
36+
${sb_languages_generator}
3437
WORKING_DIRECTORY ${LLVM_LIBRARY_OUTPUT_INTDIR}
3538
)
3639
add_custom_target(lldb-sbapi-dwarf-enums

0 commit comments

Comments
 (0)