Skip to content
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

Enabled source-building with mono runtime on any architecture. #14792

Merged
merged 4 commits into from Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/SourceBuild.props
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>
tmds marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
</Target>

Expand Down
5 changes: 5 additions & 0 deletions src/SourceBuild/tarball/content/Directory.Build.props
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
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"
tmds marked this conversation as resolved.
Show resolved Hide resolved
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
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