Skip to content

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

Merged
ViktorHofer merged 2 commits into
dotnet:mainfrom
tmds:sb
Mar 24, 2023
Merged

eng/SourceBuild.props: when unset, let the repo determine RuntimeOS.#82546
ViktorHofer merged 2 commits into
dotnet:mainfrom
tmds:sb

Conversation

@tmds

@tmdstmds commented Feb 23, 2023

Copy link
Copy Markdown
Member

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.
@ghostghost added the community-contribution Indicates that the PR has been added by a community member label Feb 23, 2023
@tmds

tmds commented Feb 23, 2023

Copy link
Copy Markdown
MemberAuthor

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

tmds commented Mar 6, 2023

Copy link
Copy Markdown
MemberAuthor

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:mainMar 24, 2023
@ViktorHofer

Copy link
Copy Markdown
Member

Thanks @tmds and sorry for the delay.

@ghostghost locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contributionIndicates 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

@tmds@ViktorHofer