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

Revert "Always use live host" #72628

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 2 additions & 3 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</PropertyGroup>

<PropertyGroup>
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</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>

Expand All @@ -61,8 +61,7 @@
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetsMobile)' != 'true'">$(DefaultMonoSubsets)host+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets>

<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
'$(BuildTargetFramework)' == '' or
Expand Down
8 changes: 8 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>1967649721058a457157d4321af3e6fceaa5441b</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHost" Version="7.0.0-preview.7.22358.7">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>1967649721058a457157d4321af3e6fceaa5441b</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostPolicy" Version="7.0.0-preview.7.22358.7">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>1967649721058a457157d4321af3e6fceaa5441b</Sha>
</Dependency>
<Dependency Name="runtime.native.System.IO.Ports" Version="7.0.0-preview.7.22358.7">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>1967649721058a457157d4321af3e6fceaa5441b</Sha>
Expand Down
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
<MicrosoftNETCoreAppRuntimewinx64Version>7.0.0-preview.7.22358.7</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETCoreDotNetHostVersion>7.0.0-preview.7.22358.7</MicrosoftNETCoreDotNetHostVersion>
<MicrosoftNETCoreDotNetHostPolicyVersion>7.0.0-preview.7.22358.7</MicrosoftNETCoreDotNetHostPolicyVersion>
<MicrosoftExtensionsDependencyModelVersion>3.1.0</MicrosoftExtensionsDependencyModelVersion>
<!-- CoreClr dependencies -->
<MicrosoftNETCoreILAsmVersion>7.0.0-preview.7.22358.7</MicrosoftNETCoreILAsmVersion>
Expand Down
10 changes: 0 additions & 10 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@
<MonoIncludeFiles Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>

<!-- Host files. Mobile uses a different hosting model, so we don't include the .NET host components there. -->
<ItemGroup Condition="'$(TargetsMobile)' != 'true' and Exists('$(DotNetHostBinDir)')">
<RuntimeFiles Include="$(DotNetHostBinDir)\$(LibPrefix)hostpolicy$(LibSuffix)">
<IsNative>true</IsNative>
</RuntimeFiles>
<RuntimeFiles Include="$(DotNetHostBinDir)\$(LibPrefix)hostfxr$(LibSuffix)">
<IsNative>true</IsNative>
</RuntimeFiles>
</ItemGroup>

<Error Condition="'@(RuntimeFiles)' == ''" Text="The '$(RuntimeFlavor)' subset must be built before building this project." />
</Target>

Expand Down
5 changes: 2 additions & 3 deletions eng/pipelines/libraries/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ jobs:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
crossBuild: ${{ parameters.crossBuild }}
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
liveRuntimeBuildConfig: ${{ parameters.liveRuntimeBuildConfig }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
runtimeVariant: ${{ parameters.runtimeVariant }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
container: ${{ parameters.container }}
container: '' # we just send to helix, no need to use a container.
condition: ${{ parameters.condition }}
testScope: ${{ parameters.testScope }}
runTests: true
Expand Down Expand Up @@ -90,7 +89,7 @@ jobs:

- ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}:
- script: $(_buildScript)
-subset host+libs.pretest
-subset libs.pretest
$(_buildArguments)
/p:RuntimeFlavor=${{ parameters.runtimeFlavor }}
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/overrideRuntimeFromLiveDrop.binlog
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionProp>HostVersion</VersionProp>
<InstallerName>dotnet-host</InstallerName>
<PackageDescription>Provides an executable implementation of the Microsoft DotNet Framework and SDK launcher module</PackageDescription>
</PropertyGroup>

<ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
<NativeBinary Include="$(DotNetHostBinDir)/dotnet$(ExeSuffix)" />
<File Include="@(NativeBinary)">
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionProp>HostPolicyVersion</VersionProp>
<PackageDescription>Provides a CoreCLR hosting policy implementation -- configuration settings, assembly paths and assembly servicing</PackageDescription>
</PropertyGroup>

<ItemGroup>
<Dependency Include="Microsoft.NETCore.DotNetHostResolver" VersionProp="HostResolverVersion" />
</ItemGroup>

<ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
<NativeBinary Include="$(DotNetHostBinDir)/$(LibPrefix)hostpolicy$(LibSuffix)"/>
<File Include="@(NativeBinary)">
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionProp>HostResolverVersion</VersionProp>
<InstallerName>dotnet-hostfxr</InstallerName>
<InstallerName Condition="'$(PgoInstrument)' != ''">$(InstallerName)-pgo</InstallerName>
<PackageDescription>Provides an implementation of framework resolution strategy used by Microsoft.NETCore.DotNetHost</PackageDescription>
</PropertyGroup>

<ItemGroup>
<Dependency Include="Microsoft.NETCore.DotNetAppHost" VersionProp="AppHostVersion" />
</ItemGroup>

<ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
<NativeBinary Include="$(DotNetHostBinDir)/$(LibPrefix)hostfxr$(LibSuffix)"/>
<File Include="@(NativeBinary)">
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions src/installer/pkg/projects/host-packages.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<Project Sdk="Microsoft.Build.Traversal" DefaultTargets="Pack">
<ItemGroup>
<ProjectReference Include="Microsoft.NETCore.DotNetAppHost\Microsoft.NETCore.DotNetAppHost.pkgproj" />
<ProjectReference Include="Microsoft.NETCore.DotNetHost\Microsoft.NETCore.DotNetHost.pkgproj" />
<ProjectReference Include="Microsoft.NETCore.DotNetHostPolicy\Microsoft.NETCore.DotNetHostPolicy.pkgproj" />
<ProjectReference Include="Microsoft.NETCore.DotNetHostResolver\Microsoft.NETCore.DotNetHostResolver.pkgproj" />
<ProjectReference Include="@(ProjectReference)" AdditionalProperties="PackageTargetRuntime=$(OutputRid)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
</ItemGroup>
</Target>

<!-- Mobile uses a different hosting model, so we don't include the .NET host components. -->
<ItemGroup Condition="'$(TargetsMobile)' != 'true'">
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostpolicy$(LibSuffix)" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostfxr$(LibSuffix)" PackOnly="true" />
</ItemGroup>

<Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<ItemGroup>
<RuntimeFiles Condition="'%(RuntimeFiles.IsNative)' == 'true'">
Expand Down
24 changes: 20 additions & 4 deletions src/libraries/externals.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<!-- Set the RuntimeIdentifier so that the DotNetHost and DotNetHostPolicy packages resolve for the corresponding runtime. -->
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' and ('$(Configuration)' == 'Debug' or '$(Coverage)' == 'true') and '$(RuntimeFlavor)' != 'Mono'">true</SwapNativeForIL>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Binplace properties -->
<BinPlaceForTargetVertical>false</BinPlaceForTargetVertical>
<BinPlaceNative>true</BinPlaceNative>
<BinPlaceRuntime>false</BinPlaceRuntime>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<UseLiveBuiltDotNetHost Condition="'$(DotNetBuildFromSource)' == 'true' or '$(TargetArchitecture)' == 's390x' or '$(TargetArchitecture)' == 'ppc64le' or '$(TargetArchitecture)' == 'armv6' or '$(TargetsLinuxBionic)' == 'true'">true</UseLiveBuiltDotNetHost>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -18,16 +21,23 @@
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />

<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.DiaSymReader.Native"
Version="$(MicrosoftDiaSymReaderNativeVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetsMobile)' != 'true' and '$(UseLiveBuiltDotNetHost)' != 'true'">
<PackageReference Include="Microsoft.NETCore.DotNetHost"
Version="$(MicrosoftNETCoreDotNetHostVersion)" />
<PackageReference Include="Microsoft.NETCore.DotNetHostPolicy"
Version="$(MicrosoftNETCoreDotNetHostPolicyVersion)" />
</ItemGroup>

<!-- Setup the testing shared framework host -->
<Target Name="SetupTestingHost"
AfterTargets="AfterResolveReferences"
Condition="Exists('$(DotNetHostBinDir)') and '$(TestNativeAot)' != 'true'">
Condition="'$(TestNativeAot)' != 'true'">
<PropertyGroup>
<UseHardlink>true</UseHardlink>
</PropertyGroup>
Expand All @@ -38,7 +48,13 @@
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' == 'apphost'" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(UseLiveBuiltDotNetHost)' != 'true'">
<HostFxFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'hostfxr' or
'%(ReferenceCopyLocalPaths.Filename)' == 'libhostfxr'" />
<DotnetExe Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'dotnet'" />
</ItemGroup>

<ItemGroup Condition="'$(UseLiveBuiltDotNetHost)' == 'true'">
<CoreHostFiles Include="$(DotNetHostBinDir)*" />
<HostFxFile Include="@(CoreHostFiles)" Condition="'%(CoreHostFiles.Filename)' == 'hostfxr' or
'%(CoreHostFiles.Filename)' == 'libhostfxr'" />
Expand All @@ -62,7 +78,7 @@
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />

<Copy Condition="$(CopyCoreDisToolsToCoreRoot)"
<Copy Condition="$(CopyCoreDisToolsToCoreRoot)"
SourceFiles="$(CoreDisToolsLibrary)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)shared\Microsoft.NETCore.App\$(ProductVersion)"
SkipUnchangedFiles="true"
Expand Down