Skip to content
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

Move DynamicCodeSupport default into aot targets #87135

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ The .NET Foundation licenses this file to you under the MIT license.
<NativeDebugSymbols Condition="$(DebugSymbols) == 'true' or ($(DebugType) != 'none' and $(DebugType) != '')">true</NativeDebugSymbols>
<!-- Workaround for https://github.com/dotnet/runtimelab/issues/771 -->
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<PublishTrimmed Condition="'$(PublishTrimmed)' == ''">true</PublishTrimmed>
<IlcPgoOptimize Condition="'$(IlcPgoOptimize)' == '' and '$(OptimizationPreference)' == 'Speed'">true</IlcPgoOptimize>
<RunILLink>false</RunILLink>
<_IsiOSLikePlatform Condition="'$(_targetOS)' == 'maccatalyst' or $(_targetOS.StartsWith('ios')) or $(_targetOS.StartsWith('tvos'))">true</_IsiOSLikePlatform>
Expand All @@ -43,6 +42,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<UseSystemResourceKeys Condition="$(IlcDisableReflection) == 'true'">true</UseSystemResourceKeys>
<EventSourceSupport Condition="$(IlcDisableReflection) == 'true'">false</EventSourceSupport>
<EventSourceSupport Condition="$(EventSourceSupport) == ''">false</EventSourceSupport>
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == ''">false</DynamicCodeSupport>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to test these things in dotnet/runtime?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of any current test infra in runtime to check that MSBuild settings correctly flow into the runtimeconfig or ILC - and I doubt folks would want to add SDK-style project tests to runtime.
At least the SDK test you added will check this once the change flows into SDK:
https://github.com/dotnet/sdk/blob/aeec71c8cb155a57e2e57f6507dd58ec9e4f3224/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs#L825

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We compile all NativeAOT tests in dotnet/runtime using this target so we could check for this in NativeAOT (look for the appcontext switch at runtime). But it won't cover CoreCLR so we could still have a bug that this is only set in Publish and not know about it. Not sure it's worth the trouble just for that.

</PropertyGroup>

<PropertyGroup Condition="'$(SuppressAotAnalysisWarnings)' == 'true'">
Expand Down