[AOT] Pass the hybrid option to AOT compiler, if enabled
#7263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #7088
When the AOT hybrid mode is enabled via the
<AndroidAotMode>Hybrid</AndroidAotMode>MSBuild property, we failed toinform the AOT compiler about its desired mode by omitting the
hybridargument from the list of options passed to the compiler via
--aotThe same would apply to the full AOT mode.
Add
hybridandfulloptions to the AOT compiler command line, ifenabled via the
AndroidAotModeMSBuild property.Mode is set after processing the
AotAdditionalArgumentsMSBuildproperty. The
AndroidAotModeproperty should always be the definitivesource 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.