-
Couldn't load subscription status.
- Fork 561
Another set of changes from #9572 #9807
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
59cbd30
Another set of changes from #9572
grendello cff7455
Fix Windows build?
jonpryor f23cfa0
Add missing parentheses
grendello 5514c95
Update build-tools/create-packs/Microsoft.Android.Runtime.proj
grendello 791666e
Skip LLVM-IR typemaps for NativeAOT
jonpryor e080d7c
Skip LLVM-IR typemaps for CoreCLR, too
jonpryor 93b1258
Don't generate typemap sources for NativeAOT
grendello b52293d
Perhaps this
grendello fd66524
Change runtime check condition to check for == 'MonoVM'
grendello c6b29f2
Create assembly store directory
grendello b07fc0a
libxamarin-app.so exist only in MonoVM atm
grendello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using System; | ||
|
|
||
| namespace Android.Runtime; | ||
|
|
||
| enum DotNetRuntimeType | ||
| { | ||
| Unknown, | ||
| MonoVM, | ||
| CoreCLR, | ||
| NativeAOT, | ||
| } | ||
|
|
||
| // This looks weird, see comments in RuntimeTypeInternal.cs | ||
| class DotNetRuntimeTypeConverter | ||
| { | ||
| // Values for the JnienvInitializeArgs.runtimeType field | ||
| // | ||
| // NOTE: Keep this in sync with managed side in src/native/common/include/managed-interface.hh | ||
| const uint RuntimeTypeMonoVM = 0x0001; | ||
| const uint RuntimeTypeCoreCLR = 0x0002; | ||
| const uint RuntimeTypeNativeAOT = 0x0004; | ||
|
|
||
| public static DotNetRuntimeType Convert (uint runtimeType) | ||
| { | ||
| return runtimeType switch { | ||
| RuntimeTypeMonoVM => DotNetRuntimeType.MonoVM, | ||
| RuntimeTypeCoreCLR => DotNetRuntimeType.CoreCLR, | ||
| RuntimeTypeNativeAOT => DotNetRuntimeType.NativeAOT, | ||
| _ => throw new NotSupportedException ($"Internal error: unsupported runtime type {runtimeType:x}") | ||
| }; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Could this value be set by a trimmer switch instead of passing it in?
The build knows the runtime it targets, so it could do the work at build time.
This would make this property treated as a constant and code for other runtimes would be trimmed away.
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.
I think that eventually turning it into a trimmer feature is the goal. But right now, I need it to be a runtime check since I sometimes work without the trimmer
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.
Trimmer feature switches use
AppContext.TryGetSwitch()if the app isn't trimmed, here is an example: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.
I disagree on both counts: I'd rather avoid the trimmer switch until we actually need it, and I don't see why we want/need this
RuntimeTypefield as well.See e.g. #9812: any place that would be "switching" on
RuntimeTypeis probably better served as a virtual method invocation onJNIEnvInit.androidRuntimeor equivalent.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.
That might be the better solution, but we can make that change at a later time, when everything is in
main, I think