<_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>
- <RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>
+ <RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor>
</PropertyGroup>
<PropertyGroup>
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages</DefaultCoreClrSubsets>
+ <!-- Even on platforms that do not support the CoreCLR runtime, we still want to build ilasm/ildasm. -->
+ <DefaultCoreClrSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultHostSubsets>host.native+host.tools</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultHostSubsets)+host.pkg+host.tests</DefaultHostSubsets>
- <DefaultHostSubsets Condition="'$(RuntimeFlavor)' == 'Mono'"></DefaultHostSubsets>
- <DefaultHostSubsets Condition="'$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true'">host.native</DefaultHostSubsets>
+ <DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'"></DefaultHostSubsets>
+ <DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">host.native</DefaultHostSubsets>
<DefaultPacksSubsets>packs.product</DefaultPacksSubsets>
<DefaultPacksSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'">$(DefaultPacksSubsets)+packs.tests</DefaultPacksSubsets>
<ItemGroup Condition="$(_subset.Contains('+clr.packages+')) and '$(PgoInstrument)' != 'true'">
<ProjectToBuild Include="$(CoreClrProjectRoot).nuget\coreclr-packages.proj" Pack="true" Category="clr" />
- <ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" BuildInParallel="false" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
+ <ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" BuildInParallel="false" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(RuntimeFlavor)' != 'Mono'"/>
</ItemGroup>
<!-- Mono sets -->
</ItemGroup>
<ItemGroup Condition="'$(PgoInstrument)' != 'true'">
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" />
- <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
+ <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />
- <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
- <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
- <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
+ <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
+ <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
+ <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
<SharedFrameworkProjectToBuild Condition="'$(MonoCrossAOTTargetOS)' != ''" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\monocrossaot.sfxproj" Pack="true" />
</ItemGroup>
<ItemGroup>
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.sfxproj" />
- <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
+ <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
<ProjectToBuild Include="@(SharedFrameworkProjectToBuild)" Category="packs" />
</ItemGroup>
</When>
<ProjectReference Include="dotnet-ilverify\dotnet-ilverify.pkgproj" />
</ItemGroup>
- <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
+ <ItemGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(DotNetBuildFromSource)' != 'true'">
<ProjectReference Include="ILCompiler.Reflection.ReadyToRun.Experimental\ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj" />
</ItemGroup>
- <ItemGroup>
+ <ItemGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
<ProjectReference Include="Microsoft.NETCore.TestHost\Microsoft.NETCore.TestHost.proj" />
+ </ItemGroup>
+
+ <ItemGroup>
<ProjectReference Include="Microsoft.NETCore.ILAsm\Microsoft.NETCore.ILAsm.proj" />
<ProjectReference Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.proj" />
</ItemGroup>
<ItemGroup>
<NativeBinary Include="$(DotNetHostBinDir)/apphost$(ExeSuffix)" />
- <NativeBinary Include="$(DotNetHostBinDir)/singlefilehost$(ExeSuffix)" />
<NativeBinary Include="$(DotNetHostBinDir)/$(LibPrefix)nethost$(LibSuffix)" />
<NativeBinary Include="$(DotNetHostBinDir)/$(LibPrefix)nethost$(StaticLibSuffix)" />
<NativeBinary Include="$(DotNetHostBinDir)/coreclr_delegates.h" />
<NativeBinary Include="$(DotNetHostBinDir)/hostfxr.h" />
<NativeBinary Include="$(DotNetHostBinDir)/nethost.h" />
</ItemGroup>
+ <ItemGroup Condition="'$(RuntimeFlavor)' != 'Mono'">
+ <NativeBinary Include="$(DotNetHostBinDir)/singlefilehost$(ExeSuffix)" />
+ </ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'windows'">
<NativeBinary Include="$(DotNetHostBinDir)/comhost.dll" />
<NativeBinary Include="$(DotNetHostBinDir)/ijwhost.dll" />
<Target Name="ReturnProductVersion" Returns="$(Version)" />
- <ItemGroup Condition="'$(RuntimeFlavor)' != 'Mono'">
+ <ItemGroup Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'">
<PackageReference Condition="'$(SkipInstallersPackageReference)' != 'true'" Include="Microsoft.DotNet.Build.Tasks.Installers" Version="$(MicrosoftDotNetBuildTasksInstallersVersion)" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Archives" Version="$(MicrosoftDotNetBuildTasksArchivesVersion)" />
</ItemGroup>
<Sdk Name="Microsoft.DotNet.SharedFramework.Sdk" />
<PropertyGroup>
- <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild>
+ <SkipBuild Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">true</SkipBuild>
<PlatformPackageType>AppHostPack</PlatformPackageType>
<UseTemplatedPlatformManifest>true</UseTemplatedPlatformManifest>
<ArchiveName>dotnet-apphost-pack</ArchiveName>
<ItemGroup>
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/apphost$(ExeSuffix)" />
- <NativeRuntimeAsset Include="$(DotNetHostBinDir)/singlefilehost$(ExeSuffix)" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)nethost$(LibSuffix)" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)nethost$(StaticLibSuffix)" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/nethost.h" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/hostfxr.h" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/coreclr_delegates.h" />
</ItemGroup>
+ <ItemGroup Condition="'$(RuntimeFlavor)' != 'Mono'">
+ <NativeRuntimeAsset Include="$(DotNetHostBinDir)/singlefilehost$(ExeSuffix)" />
+ </ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'windows'">
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/comhost.dll" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/ijwhost.dll" />
<MacOSPackageDescription>The .NET Shared Framework</MacOSPackageDescription>
</PropertyGroup>
- <PropertyGroup Condition="'$(RuntimeFlavor)' == 'Mono'">
+ <PropertyGroup Condition="'$(RuntimeFlavor)' == 'Mono' and '$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">
<RuntimeSpecificFrameworkSuffix>Mono</RuntimeSpecificFrameworkSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoEnableLLVM)' == 'true' and '$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true' and '$(TargetsBrowser)' != 'true'">
Name, used to generate the bundle upgrade code. Must stay the same to allow bundles in a given
product band to upgrade in place.
-->
- <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild>
+ <SkipBuild Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">true</SkipBuild>
<IsShipping Condition="'$(PgoInstrument)' == 'true'">false</IsShipping>
<BundleInstallerUpgradeCodeSeed>.NET Core Shared Framework Bundle Installer</BundleInstallerUpgradeCodeSeed>
<BundleThemeDirectory>$(MSBuildProjectDirectory)</BundleThemeDirectory>
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
- <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild>
+ <SkipBuild Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">true</SkipBuild>
<GenerateInstallers>true</GenerateInstallers>
<InstallerName>dotnet-host</InstallerName>
<InstallerName Condition="'$(TargetOS)' == 'OSX'">dotnet-host-internal</InstallerName>
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
- <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild>
+ <SkipBuild Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">true</SkipBuild>
<GenerateInstallers>true</GenerateInstallers>
<ArchiveName>dotnet-hostfxr-internal</ArchiveName>
<InstallerName>dotnet-hostfxr</InstallerName>
<!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
that defines the OfficialBuildRID item: all RIDs targeted by the package -->
- <Import Project="$(MSBuildProjectDirectory)\*.rids.props" Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or '$(RuntimeFlavor)' != 'Mono'"/>
+ <Import Project="$(MSBuildProjectDirectory)\*.rids.props" Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'"/>
<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->