Skip to content

Commit

Permalink
Fix source-build on the s390x platform (#58553)
Browse files Browse the repository at this point in the history
* Do not disable Mono in source-build if it is the primary runtime

This fixes a build failure when building runtime via the source-build method on s390x:  with source-build, the Mono runtime is currently not supported -- but this doesn't make sense on s390x where Mono is the *primary* (only) supported runtime.
  • Loading branch information
uweigand authored Sep 3, 2021
1 parent d57196e commit 3fa8c5c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@
that indicates tests should be run. Otherwise, they'll only be built.)
-->

<!-- Determine the primary runtime flavor. This is usually CoreCLR, except on
platforms (like s390x) where only Mono is supported. The primary runtime
flavor is used to decide when to build the hosts and installers. -->
<PropertyGroup>
<PrimaryRuntimeFlavor>CoreCLR</PrimaryRuntimeFlavor>
<PrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x'">Mono</PrimaryRuntimeFlavor>
</PropertyGroup>

<PropertyGroup>
<DefaultSubsets>clr+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+packs</DefaultSubsets>
<!-- mono is not supported in source build. On Windows mono is supported for x86/x64 only. -->
<DefaultSubsets Condition="'$(DotNetBuildFromSource)' == 'true' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+host+packs</DefaultSubsets>
<!-- In source build, mono is only supported as primary runtime flavor. On Windows mono is supported for x86/x64 only. -->
<DefaultSubsets Condition="('$(DotNetBuildFromSource)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono') or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+host+packs</DefaultSubsets>
</PropertyGroup>

<!-- Init _subset here in to allow RuntimeFlavor to be set as early as possible -->
Expand All @@ -35,14 +43,6 @@
<_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+</_subset>
</PropertyGroup>

<!-- Determine the primary runtime flavor. This is usually CoreCLR, except on
platforms (like s390x) where only Mono is supported. The primary runtime
flavor is used to decide when to build the hosts and installers. -->
<PropertyGroup>
<PrimaryRuntimeFlavor>CoreCLR</PrimaryRuntimeFlavor>
<PrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x'">Mono</PrimaryRuntimeFlavor>
</PropertyGroup>

<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetsMobile)' == 'true'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
Expand Down

0 comments on commit 3fa8c5c

Please sign in to comment.