-
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
[mono] Add conditional substitution for IsDynamicCodeSupported when targeting ios-like platforms #86971
[mono] Add conditional substitution for IsDynamicCodeSupported when targeting ios-like platforms #86971
Conversation
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger Issue DetailsThis PR introduces conditional linker substitution for Contributes to: dotnet/macios#18340
|
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
NativeAOT sets the feature switch in the sdk: https://github.com/dotnet/sdk/blob/9ca8336afab6247a22e745c2de4960e9b660d164/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L27 |
I think once Alex can land a fix for dotnet/sdk#25392, we would have the option of having it set in the SDK. There will likely need to be properties for nativeaot and monoaot. |
You can set it in WorkloadManifest.targets now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linker substitution doesn't look conditional to me?
@lewing thanks for your input, I have a couple of questions:
|
This needs to be wired up into some internal msbuild property otherwise it has no effect because we don't want anyone to change this manually. |
Agreed. Do you agree @marek-safar ? |
/cc: @lambdageek |
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures seem unrelated |
src/tests/FunctionalTests/iOS/Device/IsDynamicCodeSupported/Program.cs
Outdated
Show resolved
Hide resolved
This reverts commit 682a3c0.
I have removed the previously added test as this set up is not unit testable for which I have considered:
None of the approaches seems feasible. Finally, as this change only affects app size, the verification and impact should be observable in size/perf measurements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I agree testing this change here is not really feasible at this time. Maybe if we had "dotnet-linker-tests" for iOS working, it could be possible.
This PR introduces conditional linker substitution for
get_IsDynamicCodeSupported
method when targeting ios-like platforms with mono.The substitution is enabled when feature switch
DynamicCodeSupport
is set tofalse
, which should only happen in fullAOT mode - with no interpreter fallback.Contributes to: dotnet/macios#18340