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

[AOT] Pass the hybrid option to AOT compiler, if enabled #7263

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

grendello
Copy link
Contributor

Fixes: #7088

When the AOT hybrid mode is enabled via the
<AndroidAotMode>Hybrid</AndroidAotMode> MSBuild property, we failed to
inform the AOT compiler about its desired mode by omitting the hybrid
argument from the list of options passed to the compiler via --aot

The same would apply to the full AOT mode.

Add hybrid and full options to the AOT compiler command line, if
enabled via the AndroidAotMode MSBuild property.

Mode is set after processing the AotAdditionalArguments MSBuild
property. The AndroidAotMode property should always be the definitive
source of AOT compiler mode, as it specifies the options directly
supported by us.

Note that the AOT compiler doesn't appear to validate options passed to
it too rigorously, so setting multiple modes in some way, may have
weird/invalid effects. I don't think it's our place to verify the
modes, thus I'm not adding any code to that effect.

Fixes: dotnet#7088

When the AOT hybrid mode is enabled via the
`<AndroidAotMode>Hybrid</AndroidAotMode>` MSBuild property, we failed to
inform the AOT compiler about its desired mode by omitting the `hybrid`
argument from the list of options passed to the compiler via `--aot`

The same would apply to the full AOT mode.

Add `hybrid` and `full` options to the AOT compiler command line, if
enabled via the `AndroidAotMode` MSBuild property.

Mode is set after processing the `AotAdditionalArguments` MSBuild
property.  The `AndroidAotMode` property should always be the definitive
source of AOT compiler mode, as it specifies the options directly
supported by us.

Note that the AOT compiler doesn't appear to validate options passed to
it too rigorously, so setting multiple modes in some way, may have
weird/invalid effects.  I don't think it's our place to verify the
modes, thus I'm not adding any code to that effect.
@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jonpryor jonpryor merged commit fde885c into dotnet:main Aug 22, 2022
@grendello grendello deleted the aot-hybrid-option branch August 22, 2022 20:27
jonathanpeppers pushed a commit that referenced this pull request Aug 22, 2022
Fixes: #7088

When the AOT hybrid mode is enabled when the `$(AndroidAotMode)`
MSBuild property is set to `Hybrid`, we failed to inform the AOT
compiler about its desired mode by omitting the `hybrid` argument
from the list of options passed to the compiler via `--aot`.

The same would apply to the full AOT mode.

Add `hybrid` and `full` options to the AOT compiler command line, if
enabled via the `$(AndroidAotMode)` MSBuild property.

The mode is set after processing the `$(AndroidAotAdditionalArguments)`
MSBuild property.  The `$(AndroidAotMode)` property should always be
the definitive source of AOT compiler mode, as it specifies the
options directly supported by us.

Note that the AOT compiler doesn't appear to validate options passed
to it too rigorously, so setting multiple modes in some way, may have
weird/invalid effects.  I don't think it's our place to verify the
modes, thus I'm not adding any code to that effect.
grendello added a commit to grendello/xamarin-android that referenced this pull request Aug 23, 2022
* main:
  Bump r8 from 3.3.28 to 3.3.75 (dotnet#7292)
  [Xamarin.Android.Build.Tasks] Pass `hybrid` to AOT, if enabled (dotnet#7263)
  Bump to lz4/lz4@5ff83968 [v1.9.4] (dotnet#7262)
  [Mono.Android] add "built-in" delegate for MAUI+non-Shell (dotnet#7267)
grendello added a commit to grendello/xamarin-android that referenced this pull request Aug 23, 2022
* mm-runtime:
  Implement some requested changes
  Bump r8 from 3.3.28 to 3.3.75 (dotnet#7292)
  [Xamarin.Android.Build.Tasks] Pass `hybrid` to AOT, if enabled (dotnet#7263)
  Bump to lz4/lz4@5ff83968 [v1.9.4] (dotnet#7262)
  [Mono.Android] add "built-in" delegate for MAUI+non-Shell (dotnet#7267)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Runtime errors with IL stripped assemblies
4 participants