Skip to content

[clang] Report direct module deps for explicitly built modules (#190757)#12740

Open
Bigcheese wants to merge 1 commit intoswiftlang:stable/21.xfrom
Bigcheese:dev/direct-module-deps-21.x
Open

[clang] Report direct module deps for explicitly built modules (#190757)#12740
Bigcheese wants to merge 1 commit intoswiftlang:stable/21.xfrom
Bigcheese:dev/direct-module-deps-21.x

Conversation

@Bigcheese
Copy link
Copy Markdown

Implicitly built modules do not include PCM paths in .d files because the compiler is the one managing them, but for explicitly built modules the build system needs to know about them so that if one is deleted the build system will rebuild it.

Explicitly built modules should only report direct dependencies, as the build system knows about each PCM in the module graph. This adds -fmodule-file-deps=direct to support that, and changes dependency scanning to use this in the explicit build commands it outputs.

Assisted-by: claude-opus-4.6
(cherry picked from commit 8c389f3)

@Bigcheese Bigcheese requested a review from jansvoboda11 April 8, 2026 19:55
@Bigcheese Bigcheese requested a review from a team as a code owner April 8, 2026 19:55
@Bigcheese
Copy link
Copy Markdown
Author

@swift-ci please test

@Bigcheese
Copy link
Copy Markdown
Author

swiftlang/swift#88392

@swift-ci please test

@Bigcheese
Copy link
Copy Markdown
Author

swiftlang/swift#88392

@swift-ci please test windows

…190757)

Implicitly built modules do not include PCM paths in .d files because
the compiler is the one managing them, but for explicitly built
modules the build system needs to know about them so that if one is
deleted the build system will rebuild it.

Explicitly built modules should only report direct dependencies, as
the build system knows about each PCM in the module graph. This adds
`-fmodule-file-deps=direct` to support that, and changes dependency
scanning to use this in the explicit build commands it outputs.

Assisted-by: claude-opus-4.6
(cherry picked from commit 8c389f3)
@Bigcheese Bigcheese force-pushed the dev/direct-module-deps-21.x branch from f5fb7a1 to ef0a3c6 Compare April 10, 2026 19:50
@Bigcheese
Copy link
Copy Markdown
Author

Rebasing to see if that fixes the Windows failure.

@Bigcheese
Copy link
Copy Markdown
Author

swiftlang/swift#88392

@swift-ci please test

@Bigcheese
Copy link
Copy Markdown
Author

swiftlang/swift#88392

@swift-ci please test linux

@Bigcheese
Copy link
Copy Markdown
Author

swiftlang/swift#88392

@swift-ci please test windows

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants