Repository navigation
Promote -swift-module-file= to a driver flag - #2104
Conversation
|
@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 |
e22e746 to
729a29d
Compare
|
@swift-ci test |
Done. @cachemeifyoucan could you please take another look? |
| .experimentalClangImporterDirectCc1Scan, from: &parsedOptions) | ||
| } | ||
|
|
||
| // For explicitly-built modules, only forward -swift-module-file= to the scanning action, |
There was a problem hiding this comment.
I think the test need to check this, not just explicit module build succeeded.
729a29d to
f61789e
Compare
|
@swift-ci test |
|
@swift-ci test Windows |
Companion change to:
swiftlang/swift#87823