Closed xedin closed 3 months ago
@swift-ci please test
@swift-ci please test
@swift-ci please test Windows platform
Yeah, I need to figure out where to put the tests for this…
@MaxDesiatov I added tests to cross-compilation suite and build operation. While doing that I had an idea:
BuildSubset
to use an optional for destination
parameter and default that to .none
destination
parameter of ModulesGraph.{product, target}(for:destination:)
to use optional as well which is also defaulted to .none
.WDYT?
@swift-ci please test
@MaxDesiatov I added tests to cross-compilation suite and build operation. While doing that I had an idea:
- Change
BuildSubset
to use an optional fordestination
parameter and default that to.none
- Switch
destination
parameter ofModulesGraph.{product, target}(for:destination:)
to use optional as well which is also defaulted to.none
.- This might make "check .destination first and fallback to .tools" better scoped - only applicable when a specific destination is not requested and lets all of the commands use the graph without guessing the destination when its not clear.
WDYT?
SGTM
@xedin would you be able to confirm that this issue is fixed in this PR? rdar://129400066
@MaxDesiatov Indeed it does!
🤦 forgot to stage private
-> internal
change last night for computeLLBuildName
...
@swift-ci please test
@MaxDesiatov I'll follow-up with optional destination:
changes.
@swift-ci please test Windows platform
This is a temporary fix until we can figure out a proper way to handle situations were all we get is a name of a product or a target.
Motivation:
Callers or
ModulesGraph.{product, target}(for:destination:)
cannot always know the rightdestination
to use at the moment because i.e. for test products and targets its contextual. We need a proper fix for this at the level or BuildSystem but for now sinking the logic down intoModulesGraph
is the safest option.Modifications:
ModulesGraph.{product, target}(for:destination:)
can handle fallback if product/target turn out to be a macro, a plugin or a test.Result:
--target
and--product
options should work correctly regardless of underlying product/target kind.Resolves: rdar://129400066