-
Notifications
You must be signed in to change notification settings - Fork 437
Enabled source-building with mono runtime on any architecture. #14792
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
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ usage() { | |
| echo " --run-smoke-test don't build; run smoke tests" | ||
| echo " --with-packages <dir> use the specified directory of previously-built packages" | ||
| echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping" | ||
| echo " --use-mono-runtime output uses the mono runtime" | ||
tmds marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| echo "use -- to send the remaining arguments to MSBuild" | ||
| echo "" | ||
| } | ||
|
|
@@ -65,6 +66,9 @@ while :; do | |
| fi | ||
| shift | ||
| ;; | ||
| --use-mono-runtime) | ||
| MSBUILD_ARGUMENTS+=( "/p:SourceBuildUseMonoRuntime=true" ) | ||
| ;; | ||
| --) | ||
| shift | ||
| echo "Detected '--': passing remaining parameters '$@' as build.sh arguments." | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ild/tarball/patches/aspnetcore/0002-source-build-support-building-with-mono-runtime.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From bdad8007363d3cd6409de7994de21b0f0670b90c Mon Sep 17 00:00:00 2001 | ||
| From: Tom Deseyn <[email protected]> | ||
| Date: Wed, 19 Oct 2022 13:01:12 +0200 | ||
| Subject: [PATCH] source-build: support building with mono runtime. | ||
|
|
||
| --- | ||
| eng/SourceBuild.props | 1 + | ||
| 1 file changed, 1 insertion(+) | ||
|
|
||
| diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props | ||
| index 32108e1f..3dfbd5ef 100644 | ||
| --- a/eng/SourceBuild.props | ||
| +++ b/eng/SourceBuild.props | ||
| @@ -55,6 +55,7 @@ | ||
|
|
||
| <PropertyGroup> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier)</InnerBuildArgs> | ||
| + <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:CrossgenOutput=false</InnerBuildArgs> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| -- | ||
| 2.37.3 | ||
|
|
24 changes: 24 additions & 0 deletions
24
...eBuild/tarball/patches/runtime/0001-source-build-support-building-with-mono-runtime.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From c562789d1ad0cab0e924c49c3df16974c81099b9 Mon Sep 17 00:00:00 2001 | ||
| From: Tom Deseyn <[email protected]> | ||
| Date: Wed, 19 Oct 2022 13:00:50 +0200 | ||
| Subject: [PATCH] source-build: support building with mono runtime. | ||
|
|
||
| --- | ||
| eng/SourceBuild.props | 1 + | ||
| 1 file changed, 1 insertion(+) | ||
|
|
||
| diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props | ||
| index c197d8afd..55c1c1d22 100644 | ||
| --- a/eng/SourceBuild.props | ||
| +++ b/eng/SourceBuild.props | ||
| @@ -41,6 +41,7 @@ | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:EnableNgenOptimization=false</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:EnablePackageValidation=false</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:DisableSourceLink=false</InnerBuildArgs> | ||
| + <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| -- | ||
| 2.37.3 | ||
|
|
51 changes: 51 additions & 0 deletions
51
...ourceBuild/tarball/patches/sdk/0001-source-build-support-building-with-mono-runtime.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| From e358070323a74a46391567101be4c583680a0df0 Mon Sep 17 00:00:00 2001 | ||
| From: Tom Deseyn <[email protected]> | ||
| Date: Wed, 19 Oct 2022 13:00:45 +0200 | ||
| Subject: [PATCH] source-build: support building with mono runtime. | ||
|
|
||
| --- | ||
| eng/SourceBuild.props | 1 + | ||
| src/Layout/redist/targets/BundledSdks.targets | 2 +- | ||
| .../Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props | 2 +- | ||
| 3 files changed, 3 insertions(+), 2 deletions(-) | ||
|
|
||
| diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props | ||
| index 61b9a91..2107a71 100644 | ||
| --- a/eng/SourceBuild.props | ||
| +++ b/eng/SourceBuild.props | ||
| @@ -8,6 +8,7 @@ | ||
| <PropertyGroup> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:Projects="$(InnerSourceBuildRepoRoot)\source-build.slnf"</InnerBuildArgs> | ||
| <InnerBuildArgs>$(InnerBuildArgs) /p:UseSharedCompilation=false</InnerBuildArgs> | ||
| + <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:NativeAotSupported=false</InnerBuildArgs> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| diff --git a/src/Layout/redist/targets/BundledSdks.targets b/src/Layout/redist/targets/BundledSdks.targets | ||
| index 6f8b0fc..64638ef 100644 | ||
| --- a/src/Layout/redist/targets/BundledSdks.targets | ||
| +++ b/src/Layout/redist/targets/BundledSdks.targets | ||
| @@ -5,6 +5,6 @@ | ||
| <BundledSdk Include="FSharp.NET.Sdk" Version="1.0.4-bundled-0100" /> | ||
| <BundledSdk Include="Microsoft.Docker.Sdk" Version="1.1.0" /> | ||
| <BundledSdk Include="Microsoft.NET.ILLink.Tasks" Version="$(MicrosoftNETILLinkTasksPackageVersion)" /> | ||
| - <BundledSdk Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerPackageVersion)" /> | ||
| + <BundledSdk Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerPackageVersion)" Condition="'$(NativeAotSupported)' != 'false'" /> | ||
| </ItemGroup> | ||
| </Project> | ||
| diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props | ||
| index 73a1821..8466fff 100644 | ||
| --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props | ||
| +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props | ||
| @@ -151,7 +151,7 @@ Copyright (c) .NET Foundation. All rights reserved. | ||
| <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.CSharp.props" Condition="'$(MSBuildProjectExtension)' == '.csproj'" /> | ||
| <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.VisualBasic.props" Condition="'$(MSBuildProjectExtension)' == '.vbproj'" /> | ||
| <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.FSharp.props" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" /> | ||
| - <Import Project="Sdk.props" Sdk="Microsoft.DotNet.ILCompiler" /> | ||
| + <Import Project="Sdk.props" Sdk="Microsoft.DotNet.ILCompiler" Condition="Exists('$(MSBuildThisFileDirectory)../../Microsoft.DotNet.ILCompiler')" /> | ||
| <Import Project="Sdk.props" Sdk="Microsoft.NET.ILLink.Tasks" /> | ||
|
|
||
| <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackTool.props" /> | ||
| -- | ||
| 2.37.3 | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.