Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow TargetOS and TargetRid to be overridden in DotNetBuild.props #113765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jkoritzinsky
Copy link
Member

This is needed to fix the linux-bionic builds in the VMR.

Contributes to dotnet/source-build#4955

This is needed to fix the linux-bionic builds in the VMR
@Copilot Copilot bot review requested due to automatic review settings March 21, 2025 16:10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • eng/DotNetBuild.props: Language not supported
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky jkoritzinsky requested a review from a team March 21, 2025 16:11
Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this imply that due to L18, the passed in TargetOS value will never be used?

@jkoritzinsky
Copy link
Member Author

Yes. The problem is that the runtime's build scripts process and change the passed in TargetOS when determining the RID. Because of our "nested inner build" logic, we effectively were stripping the "-bionic" part of "linux-bionic" from the inner build invocation and building the product in a weird blend of linux, linux-bionic, and android.

By letting this calculation happen again and overwriting the TargetOS based on the RID, we can restore the calculation of the TargetOS to the correct value by re-extracting it from the RID (which we calculate based on the originally-passed-in TargetOS).

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

Successfully merging this pull request may close these issues.

2 participants