Skip to content
New issue

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

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

Already on GitHub? # to your account

eng/SourceBuild.props: when unset, let the repo determine RuntimeOS. #82546

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

tmds
Copy link
Member

@tmds tmds commented Feb 23, 2023

When source-build builds runtime, it will pass RuntimeOS and BaseOS.

When the repo is built directly using './build.sh --sb', let the repo determine those values rather than calculating them in SourceBuild.props.

Fixes #82160 (comment).

@ViktorHofer @oleksandr-didyk ptal.

When source-build builds runtime, it will pass RuntimeOS and BaseOS.

When the repo is built directly using './build.sh --sb', let the repo
determine those values rather than calculating them in SourceBuild.props.
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Feb 23, 2023
@tmds
Copy link
Member Author

tmds commented Feb 23, 2023

For some extra context, ./build.sh --sb would previously do a portable build.

Since .NET 7, source-build no longer does portable builds and some changes were made to eng/SourceBuild.props to reflect that.

With those changes, the rid for RuntimeOS changed from linux to the target rid, which broke the ./build.sh --sb command as reported in #82160 (comment).

With this PR we defer to the runtime's behavior when DotNetBuildFromSource=true, which is to assume things get built using the default SDK from Microsoft, and therefore initialize RuntimeOS to the portable rid.

@tmds
Copy link
Member Author

tmds commented Mar 6, 2023

When source-build builds this, it sets both RuntimeOS and BaseOS: https://github.com/dotnet/dotnet/blob/3b38fd69120ec5cac0433923225a8d6f1d40c0bf/repo-projects/runtime.proj#L23-L24.

The changes here are for when eng/SourceBuild.props is used directly: instead of doing something specific, they defer to the repo to do something sensible.

@ViktorHofer can you merge this?

@ViktorHofer ViktorHofer merged commit fc66eac into dotnet:main Mar 24, 2023
@ViktorHofer
Copy link
Member

Thanks @tmds and sorry for the delay.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants