Skip to content

source-build: set the properties to build for mono runtime. - #77786

Merged
ViktorHofer merged 1 commit into
dotnet:mainfrom
tmds:sb_mono
Nov 4, 2022
Merged

source-build: set the properties to build for mono runtime.#77786
ViktorHofer merged 1 commit into
dotnet:mainfrom
tmds:sb_mono

Conversation

@tmds

@tmdstmds commented Nov 2, 2022

Copy link
Copy Markdown
Member

dotnet/installer#14792 enables building .NET from source with mono runtime instead of coreclr for 'any' architecture.
This sets the runtime properties to build with mono runtime instead of coreclr.

@ViktorHofer@MichaelSimons@crummel ptal.

@ghost

ghost commented Nov 2, 2022

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghostghost added the community-contribution Indicates that the PR has been added by a community member label Nov 2, 2022
Comment threadeng/SourceBuild.props
<InnerBuildArgs>$(InnerBuildArgs) /p:EnableNgenOptimization=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:EnablePackageValidation=false</InnerBuildArgs>
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I always forget what the difference between these two properties is. Can you please add a comment describing the set values?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

These property names are not intuitive. If you build a .NET SDK, PrimaryRuntimeFlavor and RuntimeFlavor have to have the same value. So either both are Mono or both are CoreCLR.

I don't think I can come up with a meaningful comment that doesn't just put in words what the InnerBuildArgs does in code.

#68424 may provide us with a more intuitive name which we can then use here.

@ViktorHofer
ViktorHofer merged commit 664a262 into dotnet:mainNov 4, 2022
@tmds

tmds commented Nov 14, 2022

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer can you start a backport of this to 7.0? No one is backporting this to 6.0.

carlossanlop pushed a commit that referenced this pull request Nov 18, 2022
* Use generated runtime.json when building shared framework packages. (#76068)
* Use generated runtime.json when building shared framework packages.
* Don't UpdateRuntimeJson on Build.
* PR feedback.
* Update Microsoft.NETCore.Platforms.csproj
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* source-build: support building runtime using non-portable runtime packages. (#75597)
* source-build: support building runtime using non-portable runtime packages.
Currently source-build performs a 'runtime-portable' build that produces
'linux-{arch}' packages that are used when building target runtime (non-portable).
With this change, we can use the non-portable packages that are produced by
a previous (non-portable) 'runtime' build. This helps eliminate the
'runtime-portable' build.
* Avoid references to Microsoft.AspNetCore.App.<rid>.
* crossgen2: set RuntimeIdentifier explicitly.
* PR feedback
* Revert "crossgen2: set RuntimeIdentifier explicitly."
This reverts commit 10be274.
* PR feedback.
* Revert changes to ILCompiler.csproj.
* Update Directory.Build.targets
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* source-build: set the properties to build for mono runtime. (#77786)
* Pass TargetRid and SourceBuildNonPortable to the native scripts (#74504)
* Pass SourceBuild TargetRid and SourceBuildPortable args through the native script.
* Rename -packagerid to -distrorid.
* Fix init-distro-rid.sh.
* Use OutputRid instead of PackageRid.
* Drop unnecessary Condition.
* Try passing --distrorid as OutputRid.
* NativeExport: use PackageRID for AppHostRuntimeIdentifier.
* Rename --distrorid to --outputrid.
* Fix SourceBuild.props.
* Undo changes to init-distro-rid.sh.
* Let source-build leg build 'banana-x64' rid.
* SourceBuild.props: don't force a RuntimeOS.
* SourceBuild.props: set AdditionalRuntimeIdentifierParent.
* Build banana.24-x64 instead.
* Fix SourceBuild.props.
* SourceBuild.props: try fix AdditionalRuntimeIdentifier* usage.
* source-build.yml: add runtimeOS parameter.
* SourceBuild.props: derive RuntimeOS from NETCoreSdkRuntimeIdentifier.
* Undo using NETCoreSdkRuntimeIdentifier.
* Update eng/pipelines/common/global-build-job.yml
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
@ghostghost locked as resolved and limited conversation to collaborators Dec 4, 2022
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.

3 participants

@tmds@ViktorHofer@crummel