|
10 | 10 | <!-- BEGIN: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
|
11 | 11 | <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
|
12 | 12 | <PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
|
13 |
| - <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 --> |
14 |
| - <NativeAotSupported Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</NativeAotSupported> |
15 | 13 | <NativeAotSupported Condition="$(OutputRID.StartsWith('tizen')) == 'true'">false</NativeAotSupported>
|
16 | 14 | <NativeAotSupported Condition="$(OutputRID.EndsWith('-arm')) == 'true'">false</NativeAotSupported>
|
17 | 15 | <NativeAotSupported Condition="$(OutputRID.EndsWith('-x86')) == 'true'">false</NativeAotSupported>
|
|
23 | 21 | <PublishSingleFile Condition="'$(NativeAotSupported)' != 'true'">true</PublishSingleFile>
|
24 | 22 | <PublishTrimmed Condition="'$(NativeAotSupported)' != 'true'">true</PublishTrimmed>
|
25 | 23 | <SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
|
26 |
| - <!-- Compute host package name (taken from Microsoft.DotNet.ILCompiler.SingleEntry.targets) --> |
27 |
| - <_hostOS>$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-'))))</_hostOS> |
28 |
| - <_hostArchitecture Condition="'$(OS)' != 'Windows_NT'">$(NETCoreSdkPortableRuntimeIdentifier.SubString($([MSBuild]::Add($(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')), 1))))</_hostArchitecture> |
29 |
| - <_hostArchitecture Condition="'$(OS)' == 'Windows_NT'">$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</_hostArchitecture> |
30 |
| - <_hostPackageName>runtime.$(_hostOS)-$(_hostArchitecture).Microsoft.DotNet.ILCompiler</_hostPackageName> |
31 | 24 | </PropertyGroup>
|
32 | 25 |
|
33 | 26 | <ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
|
34 | 27 | <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" />
|
35 |
| - <PackageReference Include="$(_hostPackageName)" Version="$(MicrosoftDotNetILCompilerVersion)" /> |
| 28 | + <PackageReference Include="runtime.$(ToolsRID).Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" /> |
36 | 29 | </ItemGroup>
|
37 | 30 |
|
38 | 31 | <!-- Needed for the amd64 -> amd64 musl cross-build to pass the target flag. -->
|
|
94 | 87 | </Target>
|
95 | 88 |
|
96 | 89 | <ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
|
97 |
| - <CustomLinkerArg Condition="'$(CrossBuild)' == 'true' and '$(_hostArchitecture)' == '$(_targetArchitecture)' and '$(_hostOS)' != 'windows' and '$(_IsApplePlatform)' != 'true'" Include="--gcc-toolchain=$(ROOTFS_DIR)/usr" /> |
| 90 | + <CustomLinkerArg Condition="'$(CrossBuild)' == 'true' and '$(BuildArchitecture)' == '$(_targetArchitecture)' and '$(HostOS)' != 'windows' and '$(_IsApplePlatform)' != 'true'" Include="--gcc-toolchain=$(ROOTFS_DIR)/usr" /> |
98 | 91 | </ItemGroup>
|
99 | 92 |
|
100 | 93 | <Target Name="PublishCompiler"
|
|
0 commit comments