Skip to content

Commit bf1b971

Browse files
committed
Use live apphost when publishing ilc as singlefile
1 parent 9565550 commit bf1b971

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

eng/Subsets.props

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@
361361
$(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/>
362362
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
363363
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Build.Tasks\ILCompiler.Build.Tasks.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
364-
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
365364
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
366365

367366
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
@@ -529,13 +528,17 @@
529528

530529
<!-- Packs sets -->
531530

531+
<ItemGroup>
532+
<ProjectToBuild Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" Category="packs" Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(BuildOnlyPgoInstrumentedAssets)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" />
533+
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true' and $(_subset.Contains('+clr.tools+'))" />
534+
</ItemGroup>
535+
532536
<Choose>
533537
<When Condition="$(_subset.Contains('+packs.product+'))">
534538
<ItemGroup Condition="'$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
535539
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" />
536540
</ItemGroup>
537541
<ItemGroup Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
538-
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
539542
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />
540543
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
541544
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />

src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputPath>$(RuntimeBinDir)ilc/</OutputPath>
4-
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
4+
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
55
</PropertyGroup>
66

7-
<Import Project="ILCompiler.props" />
7+
<PropertyGroup Condition="'$(UseNativeAotForComponents)' != 'true' and '$(CrossBuild)' == 'true'">
8+
<UseLocalTargetingRuntimePack>true</UseLocalTargetingRuntimePack>
9+
</PropertyGroup>
810

11+
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />
12+
<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
13+
14+
<Import Project="ILCompiler.props" />
915

1016
<!-- BEGIN: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
1117
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
@@ -88,15 +94,6 @@
8894
<Target Name="PublishCompiler"
8995
Condition="'$(BuildingInsideVisualStudio)' != 'true'"
9096
AfterTargets="Build"
91-
DependsOnTargets="Publish;StompSingleFileHostPath" />
97+
DependsOnTargets="Publish" />
9298

93-
<!-- HACK: liveBuilds stomps over SingleFileHostSourcePath, setting it to the host that we just built.
94-
That's unfortunate because it's not the host we're supposed to use here. -->
95-
<Target Name="StompSingleFileHostPath"
96-
BeforeTargets="ResolveFrameworkReferences">
97-
<PropertyGroup>
98-
<SingleFileHostSourcePath></SingleFileHostSourcePath>
99-
</PropertyGroup>
100-
</Target>
101-
<!-- END: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
10299
</Project>

src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<PropertyGroup>
1010
<PublishTrimmed>true</PublishTrimmed>
11-
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
11+
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
1212
<SelfContained>true</SelfContained>
1313
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
1414
<UseLocalAppHostPack>true</UseLocalAppHostPack>

0 commit comments

Comments
 (0)