cmake: propagate generated-file dependencies to the compile order - #16077
Open
LDAP wants to merge 1 commit into
Open
cmake: propagate generated-file dependencies to the compile order#16077LDAP wants to merge 1 commit into
LDAP wants to merge 1 commit into
Conversation
The CMake subproject translation dropped two kinds of compile-order
dependency on generated files:
* OBJECT_DEPENDS, set via set_source_files_properties(), was not
parsed at all, so a source including a generated header had no edge
to the custom target producing it.
* Only the direct custom-target dependencies of a target were
collected. CMake's ninja backend emits
cmake_object_order_depends_target_* edges for the transitive
closure, so a custom target reachable only through another regular
target was lost.
Both make clean builds fail non-deterministically with a missing
generated header. Parse OBJECT_DEPENDS in the trace parser, resolve
file-level dependencies to the custom target generating the file, and
walk the dependency graph transitively when collecting the custom
targets a target must wait for.
Fixes mesonbuild#9062
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran into #9062 when trying to build glslang as subproject.
I'm not familiar with meson internals, so this is an AI generated patch. However, it fixed the issue in my case, so I wanted to submit it here for proper review:
The CMake subproject translation dropped two kinds of compile-order dependency on generated files:
Both make clean builds fail non-deterministically with a missing generated header. Parse OBJECT_DEPENDS in the trace parser, resolve file-level dependencies to the custom target generating the file, and walk the dependency graph transitively when collecting the custom targets a target must wait for.
Fixes #9062