Skip to content

Conversation

@tmds
Copy link
Member

@tmds tmds commented Nov 2, 2022

dotnet/installer#14792 enables building .NET from source with mono runtime instead of coreclr for 'any' architecture.
With mono runtime, crossgen2 is not available so we mustn't use it while building aspnetcore.

@dougbu ptal.

cc @MichaelSimons @crummel

@tmds tmds requested review from a team, dougbu and wtgodbe as code owners November 2, 2022 14:12
@ghost ghost added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member labels Nov 2, 2022
@ghost
Copy link

ghost commented Nov 2, 2022

Thanks for your PR, @tmds. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.


<PropertyGroup>
<InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:CrossgenOutput=false</InnerBuildArgs>
Copy link
Member

Choose a reason for hiding this comment

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

Could we use regular crossgen?

Copy link
Contributor

Choose a reason for hiding this comment

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

What will set $(SourceBuildUseMonoRuntime)❔ I don't see it in Arcade, at least the commit I've got locally

Copy link
Member Author

Choose a reason for hiding this comment

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

Could we use regular crossgen?

I don't know. Maybe mono doesn't support R2R assemblies? I'm just guessing.
Disabling this is what we're doing on the mono specific architectures already:

<!-- Optimize the framework using the crossgen2 tool. Crossgen2 is not currently supported on s390x or ppc64le or armv6. -->
<CrossgenOutput Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le' ">false</CrossgenOutput>
<CrossgenOutput Condition=" '$(CrossgenOutput)' == '' AND '$(Configuration)' != 'Debug' ">true</CrossgenOutput>

What will set $(SourceBuildUseMonoRuntime)grey_question I don't see it in Arcade, at least the commit I've got locally

It gets set by installer, see dotnet/installer#14792.

@dougbu
Copy link
Contributor

dougbu commented Nov 5, 2022

@tmds let us (@wtgodbe and I) know if you need us to merge this for you. In addition, this repo supports the backport bot and we can automatically create similar changes in servicing branches if needed.

@tmds
Copy link
Member Author

tmds commented Nov 9, 2022

@dougbu yes, please merge this, and also backport it to 7.0.

@dougbu dougbu merged commit 129de01 into dotnet:main Nov 9, 2022
@ghost ghost added this to the 8.0-preview1 milestone Nov 9, 2022
@dougbu
Copy link
Contributor

dougbu commented Nov 9, 2022

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

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

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework 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.

4 participants