Promote -swift-module-file= to a driver flag#2104
Promote -swift-module-file= to a driver flag#2104artemcm wants to merge 1 commit intoswiftlang:mainfrom
-swift-module-file= to a driver flag#2104Conversation
|
@swift-ci test |
cachemeifyoucan
left a comment
There was a problem hiding this comment.
I think this needs to be a lot more complicated for explicit module build.
For explicit module build, the flag should be only passed to scanner, and the scanner will plan the build and return the dependency graph with the module file passed as part of it. That is the only way for caching build to be supported.
I don't know if this matters for implicit build, but implicit build can just pass the flag to frontend.
1800a62 to
4ca5b2c
Compare
|
@swift-ci test |
Good catch. Done. |
cachemeifyoucan
left a comment
There was a problem hiding this comment.
Can we add a test for explicit module build?
|
|
||
| // For explicitly-built modules, only forward -swift-module-file= to the scanning action, | ||
| // for implicitly-built modules, forward it to all compilation tasks. | ||
| if (isPlanJobForExplicitModule && kind == .scanDependencies) || !isPlanJobForExplicitModule { |
There was a problem hiding this comment.
is isPlanJobForExplicitModule always true when kind == .scanDependencies?
There was a problem hiding this comment.
I expect it to be, yes.
There already is a test for explicit module build. What do you have in mind that's not covered there? |
I want to see scanner returns the correct result when you pass |
Companion change to:
swiftlang/swift#87823