Skip to content

Conversation

@chelcassanova
Copy link
Contributor

On the LLDB GreenDragon standalone build, there's currently an error at config time wherein the target libldlb-resource-headers and the individual targets that run the framework fixup script on the header files for the framework (lldb-framework-fixup-header-) both depend on the header file being staged, but neither of which depend on each other. That dependency could be introduced, but I think it would be better if liblldb-resource-headers no longer had a file-based dependency on the staged headers as this is now taken care of by the target lldb-framework-fixup-all-headers.

On the LLDB GreenDragon standalone build, there's currently an error
at config time wherein the target libldlb-resource-headers and the
individual targets that run the framework fixup script on the header
files for the framework (lldb-framework-fixup-header-<header-filename>)
both depend on the header file being staged, but neither of which depend
on each other. That dependency could be introduced, but I think it would
be better if liblldb-resource-headers no longer had a file-based
dependency on the staged headers as this is now taken care of by the
target lldb-framework-fixup-all-headers.
@llvmbot
Copy link
Member

llvmbot commented Jul 23, 2025

@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)

Changes

On the LLDB GreenDragon standalone build, there's currently an error at config time wherein the target libldlb-resource-headers and the individual targets that run the framework fixup script on the header files for the framework (lldb-framework-fixup-header-<header-filename>) both depend on the header file being staged, but neither of which depend on each other. That dependency could be introduced, but I think it would be better if liblldb-resource-headers no longer had a file-based dependency on the staged headers as this is now taken care of by the target lldb-framework-fixup-all-headers.


Full diff: https://github.com/llvm/llvm-project/pull/150300.diff

1 Files Affected:

  • (modified) lldb/cmake/modules/LLDBFramework.cmake (+1-5)
diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake
index c6f00ed05cfc2..ef25684c81fc0 100644
--- a/lldb/cmake/modules/LLDBFramework.cmake
+++ b/lldb/cmake/modules/LLDBFramework.cmake
@@ -71,12 +71,8 @@ endif()
 find_program(unifdef_EXECUTABLE unifdef)
 
 # Wrap output in a target, so lldb-framework can depend on it.
-add_custom_target(liblldb-resource-headers DEPENDS lldb-sbapi-dwarf-enums ${lldb_staged_headers})
+add_custom_target(liblldb-resource-headers DEPENDS lldb-sbapi-dwarf-enums)
 set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources")
-# We're taking the header files from where they've been staged in the build directory's include folder,
-# so create a dependency on the build step that creates that directory.
-add_dependencies(liblldb-resource-headers liblldb-header-staging)
-add_dependencies(liblldb liblldb-resource-headers)
 
 # Copy vendor-specific headers from clang (without staging).
 if(NOT APPLE_EMBEDDED)

@bulbazord
Copy link
Member

Makes sense to me. Generally in CMake, if you have a file generated by a command and multiple independent targets depend on said file, you should "wrap" the file into a custom target and have everything depend on the custom target instead. Only one target should depend on these generated files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants