Fix source-build on the s390x platform (#58618)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fri, 3 Sep 2021 14:59:27 +0000 (16:59 +0200)
committerGitHub <noreply@github.com>
Fri, 3 Sep 2021 14:59:27 +0000 (16:59 +0200)
* Do not disable Mono in source-build if it is the primary runtime

Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
eng/Subsets.props

index 332632c..c935f7c 100644 (file)
         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 -->
     <_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>