Skip to content

Commit

Permalink
[libs][iOS] Unify System.Linq.Expression.dll build for all platforms (
Browse files Browse the repository at this point in the history
#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 xamarin/xamarin-macios#18555 needs to be merged
  • Loading branch information
ivanpovazan committed Jul 19, 2023
1 parent e695432 commit deca993
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.

This file was deleted.

@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-maccatalyst</TargetFrameworks>
<IsInterpreting>false</IsInterpreting>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DefineConstants> $(DefineConstants);FEATURE_FAST_CREATE</DefineConstants>
<NoWarn>$(NoWarn);CA1859</NoWarn>
<EnableAOTAnalyzer>false</EnableAOTAnalyzer>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsInterpreting Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'maccatalyst'">true</IsInterpreting>
<ILLinkSubstitutionsLibraryBuildXml Condition="'$(IsInterpreting)' == 'true'">ILLink\ILLink.Substitutions.IsInterpreting.LibraryBuild.xml</ILLinkSubstitutionsLibraryBuildXml>
<!--
Disable constant propagation so that methods referenced from ILLink.Substitutions.xml don't get inlined
with a wrong value at library build time and the substitution can still be selected at publish time.
For iOS/tvOS/Catalyst we prefer smaller size by default, so keep constprop enabled to get rid of the expression compiler.
-->
<ILLinkDisableIPConstProp Condition="'$(TargetPlatformIdentifier)' != 'ios' and '$(TargetPlatformIdentifier)' != 'tvos' and '$(TargetPlatformIdentifier)' != 'maccatalyst'">true</ILLinkDisableIPConstProp>
<ILLinkDisableIPConstProp>true</ILLinkDisableIPConstProp>
</PropertyGroup>
<ItemGroup>
<ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.xml" />
Expand Down
2 changes: 1 addition & 1 deletion src/mono/msbuild/apple/build/AppleBuild.targets
Expand Up @@ -143,7 +143,7 @@
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-fetch-trampolines=256" />
<MonoAOTCompilerDefaultAotArguments Include="ngsharedvt-trampolines=4400" />
<MonoAOTCompilerDefaultAotArguments Include="nftnptr-arg-trampolines=4000" />
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=50000" />
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=110000" />

<MonoAOTCompilerDefaultProcessArguments Include="-O=gsharedvt" />
</ItemGroup>
Expand Down

0 comments on commit deca993

Please sign in to comment.