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

[mono][ios] Apple mobile template allows passing process arguments to the runtime #92772

Merged

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Sep 28, 2023

Description

This PR introduces changes to the apple mobile template which allows passing process arguments to the runtime. The mono_ios_runtime_init function is updated to take process arguments (argc and argv) and invokes mono_jit_parse_options function. The mono_ios_runtime_init function already retrieves the arguments and they are passed to the mono_jit_parse_options.

This PR is the result of testing the --aot-lazy-assembly-load runtime parameter. The goal was to identify a potential workaround for #92767.

@ghost
Copy link

ghost commented Sep 28, 2023

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

This PR introduces changes to the apple mobile template which allows passing process arguments to the runtime. The mono_ios_runtime_init function is updated to take process arguments (argc and argv) and invokes mono_jit_parse_options function.

This PR is the result of testing the --aot-lazy-assembly-load runtime parameter. The goal was to identify a potential workaround for #92767.

Author: kotlarmilos
Assignees: kotlarmilos
Labels:

area-Codegen-AOT-mono, os-ios

Milestone: 9.0.0

@steveisok
Copy link
Member

@kotlarmilos do we need to modify anything in xharness to provide a way to shovel args?

@kotlarmilos
Copy link
Member Author

@kotlarmilos do we need to modify anything in xharness to provide a way to shovel args?

It should be already possible to pass extra arguments to the iOS app bundle:
https://github.com/dotnet/xharness/blob/2b1d423ce08e1ed78c0a821d0850e0f5ab3b193a/src/Microsoft.DotNet.XHarness.Apple/AppOperations/AppTester.cs#L566-L570

@kotlarmilos
Copy link
Member Author

@ivanpovazan @akoeplinger Please provide feedback when you have a chance, not urgent :)

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

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

LGTM!
Left only two smaller suggestions.

src/tasks/AppleAppBuilder/Templates/runtime.h Outdated Show resolved Hide resolved
src/tasks/AppleAppBuilder/Templates/runtime.m Outdated Show resolved Hide resolved
kotlarmilos and others added 3 commits October 4, 2023 17:11
Co-authored-by: Ivan Povazan <55002338+ivanpovazan@users.noreply.github.com>
@kotlarmilos kotlarmilos merged commit 9634520 into dotnet:main Oct 6, 2023
166 checks passed
@ghost ghost locked as resolved and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants