Look up the target OS for crossgen2 using the full target RID #45566
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.
Lookup the target OS for crossgen2 invocation based on the full RID instead of an OS-only portion of the RID. In source-build scenarios, we will likely only have a full
os-arch
RID in the RID graph. If we use only theos
RID, we won't find a matching OS RID in the graph for the target OS. If we use the fullos-arch
RID, we'll be able to find our target in the graph.This work allows us to remove the
portablePlatform == null && _hostRuntimeIdentifier == _targetRuntimeIdentifier
special case, as we'll now find the portable platform based on_targetRuntimeIdentifier
.Also remove the special checks for
linux-musl
as thelinux-musl
RID imports thelinux
RID, so we can just look forlinux
and get the right behavior.