Skip to content

Commit 57aeadb

Browse files
authored
[NativeAOT] Refactor Linq feature switches (#89308)
1 parent 1bfd46d commit 57aeadb

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ The .NET Foundation licenses this file to you under the MIT license.
4141
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == ''">false</DynamicCodeSupport>
4242
</PropertyGroup>
4343

44+
<!-- Configure LINQ expressions -->
45+
<ItemGroup>
46+
<RuntimeHostConfigurationOption Include="System.Linq.Expressions.CanEmitObjectArrayDelegate"
47+
Value="false"
48+
Trim="true" />
49+
</ItemGroup>
50+
4451
<PropertyGroup Condition="'$(SuppressAotAnalysisWarnings)' == 'true'">
4552
<EnableAotAnalyzer Condition="'$(EnableAotAnalyzer)' == ''">false</EnableAotAnalyzer>
4653
</PropertyGroup>
@@ -274,11 +281,6 @@ The .NET Foundation licenses this file to you under the MIT license.
274281

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

277-
<!-- Configure LINQ expressions - disable Emit everywhere -->
278-
<IlcArg Include="--feature:System.Linq.Expressions.CanCompileToIL=false" />
279-
<IlcArg Include="--feature:System.Linq.Expressions.CanEmitObjectArrayDelegate=false" />
280-
<IlcArg Include="--feature:System.Linq.Expressions.CanCreateArbitraryDelegates=false" />
281-
282284
<!-- Linux Bionic doesn't ship GSSAPI, so enable managed implementation -->
283285
<IlcArg Condition="'$(_linuxLibcFlavor)' == 'bionic'" Include="--feature:System.Net.Security.UseManagedNtlm=true" />
284286

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<linker>
22
<assembly fullname="System.Linq.Expressions">
3-
<type fullname="System.Linq.Expressions.LambdaExpression">
4-
<method signature="System.Boolean get_CanCompileToIL()" feature="System.Linq.Expressions.CanCompileToIL" featurevalue="false" body="stub" value="false" />
5-
</type>
63
<type fullname="System.Dynamic.Utils.DelegateHelpers">
74
<method signature="System.Boolean get_CanEmitObjectArrayDelegate()" feature="System.Linq.Expressions.CanEmitObjectArrayDelegate" featurevalue="false" body="stub" value="false" />
85
</type>
9-
<type fullname="System.Linq.Expressions.Interpreter.CallInstruction">
10-
<method signature="System.Boolean get_CanCreateArbitraryDelegates()" feature="System.Linq.Expressions.CanCreateArbitraryDelegates" featurevalue="false" body="stub" value="false" />
11-
</type>
126
</assembly>
137
</linker>

0 commit comments

Comments
 (0)