-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NativeAOT] Refactor System.Linq.Expressions feature switches #89308
[NativeAOT] Refactor System.Linq.Expressions feature switches #89308
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThis PR:
PS: If desired, I can pull out all the other explicit feature switches to the
and friends Fixes #89171 /cc @dotnet/ilc-contrib
|
Let's not do that unless necessary. Promoting this to RuntimeHostConfigurationOption is more lines of code, and also a tiny size regression (the compiler is also required to promote these to AppContext switches at runtime), whereas |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures seem unrelated. |
This PR:
System.Linq.Expressions.dll
:CanCompileToIL
andCanCreateArbitraryDelegates
as they are now respectingIsDynamicCodeSupported
:runtime/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs
Line 29 in 7982376
runtime/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs
Line 19 in 7982376
CanEmitObjectArrayDelegate
into theRuntimeHostConfigurationOption
item so other tools (like ILLink) can can also understand the desired trimming configurationSystem.Linq.Expressions
support with Xamarin+NativeAOT asCanEmitObjectArrayDelegate
gets removed during ILLink trimming due to constant propagation, which makes the property not visible when it reaches ILCompiler during the build processPS: If desired, I can pull out all the other explicit feature switches to the
RuntimeHostConfigurationOption
like:runtime/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
Line 275 in 7982376
and friends
Fixes #89171
/cc @dotnet/ilc-contrib