|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 | <PropertyGroup> |
3 | 3 | <OutputPath>$(RuntimeBinDir)ilc/</OutputPath> |
4 | | - <RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier> |
| 4 | + <RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier> |
| 5 | + |
| 6 | + <!-- Mobile platforms do not have apphost and we don't need it. However, restore requires |
| 7 | + "some" apphost; use PackageRID of host machine to satisfy that bogus requirement. --> |
| 8 | + <RuntimeIdentifier Condition="'$(TargetsMobile)' == 'true'">$(PackageRID)</RuntimeIdentifier> |
5 | 9 | </PropertyGroup> |
6 | 10 |
|
7 | | - <Import Project="ILCompiler.props" /> |
| 11 | + <PropertyGroup Condition="'$(UseNativeAotForComponents)' != 'true' and '$(CrossBuild)' == 'true' and '$(TargetsMobile)' != 'true'"> |
| 12 | + <UseLocalTargetingRuntimePack>true</UseLocalTargetingRuntimePack> |
| 13 | + </PropertyGroup> |
| 14 | + |
| 15 | + <Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(UseNativeAotForComponents)' != 'true' and '$(CrossBuild)' == 'true' and '$(TargetsMobile)' != 'true'" /> |
| 16 | + <Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" Condition="'$(UseNativeAotForComponents)' != 'true' and '$(CrossBuild)' == 'true' and '$(TargetsMobile)' != 'true'" /> |
8 | 17 |
|
| 18 | + <Import Project="ILCompiler.props" /> |
9 | 19 |
|
10 | 20 | <!-- BEGIN: Workaround for https://github.com/dotnet/runtime/issues/67742 --> |
11 | 21 | <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'"> |
12 | 22 | <PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir> |
13 | 23 | <PublishAot Condition="'$(UseNativeAotForComponents)' == 'true'">true</PublishAot> |
14 | 24 | <SysRoot Condition="'$(UseNativeAotForComponents)' == 'true' and '$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> |
15 | | - <PublishReadyToRun Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishReadyToRun> |
| 25 | + <PublishReadyToRun Condition="'$(UseNativeAotForComponents)' != 'true' and '$(UseLocalTargetingRuntimePack)' != 'true'">true</PublishReadyToRun> |
16 | 26 | <PublishSingleFile Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishSingleFile> |
17 | 27 | <PublishTrimmed Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishTrimmed> |
18 | 28 | <SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning> |
|
88 | 98 | <Target Name="PublishCompiler" |
89 | 99 | Condition="'$(BuildingInsideVisualStudio)' != 'true'" |
90 | 100 | AfterTargets="Build" |
91 | | - DependsOnTargets="Publish;StompSingleFileHostPath" /> |
| 101 | + DependsOnTargets="Publish" /> |
92 | 102 |
|
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 --> |
102 | 103 | </Project> |
0 commit comments