|
11 | 11 | <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'"> |
12 | 12 | <PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir> |
13 | 13 | <!-- block win-x86 PublishAot until preview 5 --> |
14 | | - <NativeAotSupported Condition="$(OutputRID.EndsWith('-x86')) == 'true'">false</NativeAotSupported> |
15 | | - <PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot> |
16 | | - <SysRoot Condition="'$(NativeAotSupported)' == 'true' and '$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> |
17 | | - <PublishReadyToRun Condition="'$(NativeAotSupported)' != 'true'">true</PublishReadyToRun> |
18 | | - <PublishSingleFile Condition="'$(NativeAotSupported)' != 'true'">true</PublishSingleFile> |
19 | | - <PublishTrimmed Condition="'$(NativeAotSupported)' != 'true'">true</PublishTrimmed> |
| 14 | + <NativeAotCanExecuteOnHost Condition="'$(NativeAotCanExecuteOnHost)' == 'true' and $(OutputRID.EndsWith('-x86')) == 'true'">false</NativeAotCanExecuteOnHost> |
| 15 | + <PublishAot Condition="'$(NativeAotCanExecuteOnHost)' == 'true'">true</PublishAot> |
| 16 | + <SysRoot Condition="'$(NativeAotCanExecuteOnHost)' == 'true' and '$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> |
| 17 | + <PublishReadyToRun Condition="'$(NativeAotCanExecuteOnHost)' != 'true'">true</PublishReadyToRun> |
| 18 | + <PublishSingleFile Condition="'$(NativeAotCanExecuteOnHost)' != 'true'">true</PublishSingleFile> |
| 19 | + <PublishTrimmed Condition="'$(NativeAotCanExecuteOnHost)' != 'true'">true</PublishTrimmed> |
20 | 20 | <SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning> |
21 | 21 | <!-- Can be removed (along with RuntimeHostConfigurationOption below) |
22 | 22 | once we build with a more recent SDK that has https://github.com/dotnet/sdk/pull/40106. --> |
23 | 23 | <_ComObjectDescriptorSupport>false</_ComObjectDescriptorSupport> |
24 | 24 | </PropertyGroup> |
25 | 25 |
|
26 | | - <ItemGroup Condition="'$(NativeAotSupported)' == 'true'"> |
| 26 | + <ItemGroup Condition="'$(NativeAotCanExecuteOnHost)' == 'true'"> |
27 | 27 | <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" /> |
28 | 28 | <PackageReference Include="runtime.$(ToolsRID).Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" /> |
29 | 29 | <RuntimeHostConfigurationOption Include="System.ComponentModel.TypeDescriptor.IsComObjectDescriptorSupported" |
|
57 | 57 | </Target> |
58 | 58 |
|
59 | 59 | <Target Name="LocateNativeCompiler" |
60 | | - Condition="'$(NativeAotSupported)' == 'true' and '$(HostOS)' != 'windows'" |
| 60 | + Condition="'$(NativeAotCanExecuteOnHost)' == 'true' and '$(HostOS)' != 'windows'" |
61 | 61 | BeforeTargets="SetupOSSpecificProps"> |
62 | 62 | <PropertyGroup> |
63 | 63 | <CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker> |
|
79 | 79 | <_XcodeVersion>$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))</_XcodeVersion> |
80 | 80 | </PropertyGroup> |
81 | 81 |
|
82 | | - <ItemGroup Condition="'$(NativeAotSupported)' == 'true' and '$(_IsApplePlatform)' == 'true'"> |
| 82 | + <ItemGroup Condition="'$(NativeAotCanExecuteOnHost)' == 'true' and '$(_IsApplePlatform)' == 'true'"> |
83 | 83 | <CustomLinkerArg Condition="'$(_XcodeVersion)' >= '15'" Include="-ld_classic" /> |
84 | 84 | </ItemGroup> |
85 | 85 |
|
|
90 | 90 | </PropertyGroup> |
91 | 91 | </Target> |
92 | 92 |
|
93 | | - <ItemGroup Condition="'$(NativeAotSupported)' == 'true'"> |
| 93 | + <ItemGroup Condition="'$(NativeAotCanExecuteOnHost)' == 'true'"> |
94 | 94 | <CustomLinkerArg Condition="'$(CrossBuild)' == 'true' and '$(BuildArchitecture)' == '$(_targetArchitecture)' and '$(HostOS)' != 'windows' and '$(_IsApplePlatform)' != 'true'" Include="--gcc-toolchain=$(ROOTFS_DIR)/usr" /> |
95 | 95 | </ItemGroup> |
96 | 96 |
|
|
0 commit comments