Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<InnerBuildArgs>$(InnerBuildArgs) /p:IncludeNuGetPackageArchive=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:IncludeAdditionalSharedFrameworks=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:IncludeSharedFrameworksForBackwardsCompatibilityTests=false</InnerBuildArgs>
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:DISABLE_CROSSGEN=true</InnerBuildArgs>
</PropertyGroup>
</Target>

Expand Down
5 changes: 5 additions & 0 deletions src/SourceBuild/tarball/content/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@

<UseStableVersions Condition="'$(UseStableVersions)' == ''">false</UseStableVersions>

<SourceBuildUseMonoRuntime>false</SourceBuildUseMonoRuntime>
<!-- These architectures are only supported with mono runtime -->
<SourceBuildUseMonoRuntime Condition="'$(BuildArchitecture)' == 's390x'">true</SourceBuildUseMonoRuntime>
<SourceBuildUseMonoRuntime Condition="'$(BuildArchitecture)' == 'ppc64le'">true</SourceBuildUseMonoRuntime>

<!-- new supported portable/nonportable options. These control whether to build portable runtime
or portable SDK. The PortableBuild flag is only set in runtime-portable.proj and should
no longer be passed in. -->
Expand Down
4 changes: 4 additions & 0 deletions src/SourceBuild/tarball/content/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

Choose a reason for hiding this comment

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

Please alphabetize.

echo "use -- to send the remaining arguments to MSBuild"
echo ""
}
Expand Down Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)"</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)"</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:PreviouslySourceBuiltNupkgCacheDir="$(PrebuiltSourceBuiltPackagesPath)"</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:SourceBuildUseMonoRuntime=$(SourceBuildUseMonoRuntime)</StandardSourceBuildArgs>

<StandardSourceBuildCommand>$(ProjectDirectory)\build$(ShellExtension)</StandardSourceBuildCommand>
</PropertyGroup>
Expand Down
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

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

Loading