Skip to content

Commit

Permalink
[NativeAOT] Refactor Linq feature switches (#89308)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpovazan committed Jul 25, 2023
1 parent 1bfd46d commit 57aeadb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ The .NET Foundation licenses this file to you under the MIT license.
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == ''">false</DynamicCodeSupport>
</PropertyGroup>

<!-- Configure LINQ expressions -->
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Linq.Expressions.CanEmitObjectArrayDelegate"
Value="false"
Trim="true" />
</ItemGroup>

<PropertyGroup Condition="'$(SuppressAotAnalysisWarnings)' == 'true'">
<EnableAotAnalyzer Condition="'$(EnableAotAnalyzer)' == ''">false</EnableAotAnalyzer>
</PropertyGroup>
Expand Down Expand Up @@ -274,11 +281,6 @@ The .NET Foundation licenses this file to you under the MIT license.

<IlcArg Condition="$(IlcDisableReflection) == 'true'" Include="--feature:System.Reflection.IsReflectionExecutionAvailable=false" />

<!-- Configure LINQ expressions - disable Emit everywhere -->
<IlcArg Include="--feature:System.Linq.Expressions.CanCompileToIL=false" />
<IlcArg Include="--feature:System.Linq.Expressions.CanEmitObjectArrayDelegate=false" />
<IlcArg Include="--feature:System.Linq.Expressions.CanCreateArbitraryDelegates=false" />

<!-- Linux Bionic doesn't ship GSSAPI, so enable managed implementation -->
<IlcArg Condition="'$(_linuxLibcFlavor)' == 'bionic'" Include="--feature:System.Net.Security.UseManagedNtlm=true" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<linker>
<assembly fullname="System.Linq.Expressions">
<type fullname="System.Linq.Expressions.LambdaExpression">
<method signature="System.Boolean get_CanCompileToIL()" feature="System.Linq.Expressions.CanCompileToIL" featurevalue="false" body="stub" value="false" />
</type>
<type fullname="System.Dynamic.Utils.DelegateHelpers">
<method signature="System.Boolean get_CanEmitObjectArrayDelegate()" feature="System.Linq.Expressions.CanEmitObjectArrayDelegate" featurevalue="false" body="stub" value="false" />
</type>
<type fullname="System.Linq.Expressions.Interpreter.CallInstruction">
<method signature="System.Boolean get_CanCreateArbitraryDelegates()" feature="System.Linq.Expressions.CanCreateArbitraryDelegates" featurevalue="false" body="stub" value="false" />
</type>
</assembly>
</linker>

0 comments on commit 57aeadb

Please sign in to comment.