Skip to content

Commit deca993

Browse files
authored
[libs][iOS] Unify System.Linq.Expression.dll build for all platforms (#88723)
- Ship a single assembly for all platforms, and have better compatibility between our AOT engines - Size of the shipped assembly for iOS-like platforms is increased by ~113Kb - The fullAOT + UseInterpreter=true configurations with Mono are now interpreting Ref.Emit generated code instead of using Reflection - To prevent size regressions with Mono dotnet/macios#18555 needs to be merged
1 parent e695432 commit deca993

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

src/libraries/System.Linq.Expressions/src/ILLink/ILLink.Substitutions.IsInterpreting.LibraryBuild.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-maccatalyst</TargetFrameworks>
4-
<IsInterpreting>false</IsInterpreting>
3+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
54
<DefineConstants> $(DefineConstants);FEATURE_FAST_CREATE</DefineConstants>
65
<NoWarn>$(NoWarn);CA1859</NoWarn>
76
<EnableAOTAnalyzer>false</EnableAOTAnalyzer>
8-
</PropertyGroup>
9-
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
10-
<PropertyGroup>
11-
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
12-
<IsInterpreting Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'maccatalyst'">true</IsInterpreting>
13-
<ILLinkSubstitutionsLibraryBuildXml Condition="'$(IsInterpreting)' == 'true'">ILLink\ILLink.Substitutions.IsInterpreting.LibraryBuild.xml</ILLinkSubstitutionsLibraryBuildXml>
147
<!--
158
Disable constant propagation so that methods referenced from ILLink.Substitutions.xml don't get inlined
169
with a wrong value at library build time and the substitution can still be selected at publish time.
17-
For iOS/tvOS/Catalyst we prefer smaller size by default, so keep constprop enabled to get rid of the expression compiler.
1810
-->
19-
<ILLinkDisableIPConstProp Condition="'$(TargetPlatformIdentifier)' != 'ios' and '$(TargetPlatformIdentifier)' != 'tvos' and '$(TargetPlatformIdentifier)' != 'maccatalyst'">true</ILLinkDisableIPConstProp>
11+
<ILLinkDisableIPConstProp>true</ILLinkDisableIPConstProp>
2012
</PropertyGroup>
2113
<ItemGroup>
2214
<ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.xml" />

src/mono/msbuild/apple/build/AppleBuild.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-fetch-trampolines=256" />
144144
<MonoAOTCompilerDefaultAotArguments Include="ngsharedvt-trampolines=4400" />
145145
<MonoAOTCompilerDefaultAotArguments Include="nftnptr-arg-trampolines=4000" />
146-
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=50000" />
146+
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=110000" />
147147

148148
<MonoAOTCompilerDefaultProcessArguments Include="-O=gsharedvt" />
149149
</ItemGroup>

0 commit comments

Comments
 (0)