-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Linux-bionic (Android libc w/o Android interop) initial implementation #66147
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @directhex Issue DetailsI expect I broke something along the way, so let's see just how badly. Closes: #66027
|
…into joshield/linux-bionic
src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
Outdated
Show resolved
Hide resolved
Urgh, horrible merge failure means I spent hours cleaning up unneeded changes, and they reappeared anyway |
New regression: SSL doesn't work because an Android System.Net.Security is being used instead of a Linux one, which causes it to forcibly load Android SSL instead of OpenSSL. |
I don't think parts of System.Net.Security are going to work on Android anyway. At least not in .NET 6. |
That's kinda the point. It worked yesterday when the build system assumed Bionic was Linux, and it's broken today now the build system thinks Bionic is Android, and I'm trying to figure out how to massage that in the build system to behave better (msbuild log viewer shows none of my properties in System.Net.Security.csproj are getting resolved, something odd is going on) |
You'd think! And yet Hence "and something odd is going on" |
Looks like the problem is with the structured log viewer, I see more via |
Okay, so, need help from someone who understands the libraries build a little better here (@ericstj?)
|
Okay, there's a few small bits & pieces to clean up, but the broad strokes are there (e.g. the on-device build is green and the tests are published), so I'm gonna mark this ready for review. Hopefully we can nail down any lingering issues by the end of the week, and clean up any questionable conditions to everyone's satisfaction. |
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. Thank you.
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.
Great jobs, I left a couple comments but this is really close :)
@@ -83,6 +83,8 @@ | |||
#define FALLBACK_HOST_RID _X("solaris") | |||
#elif defined(TARGET_LINUX_MUSL) | |||
#define FALLBACK_HOST_RID _X("linux-musl") | |||
#elif defined(TARGET_ANDROID) |
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.
it'd probably be better to introduce a TARGET_LINUX_BIONIC define instead.
<_MonoRunInitCompiler>false</_MonoRunInitCompiler> | ||
</PropertyGroup> | ||
<ItemGroup Condition="'$(TargetsAndroid)' == 'true'"> | ||
<ItemGroup Condition="'$(TargetsLinuxBionic)' == 'true'"> | ||
<_MonoCPPFLAGS Include="-DANDROID_FORCE_ICU_DATA_DIR" /> |
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.
nit: call this FORCE_ANDROID_ICU_DATA_DIR to make it consistent with FORCE_ANDROID_OPENSSL (or change the other one, I don't have a preference)
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.
probably better to move this to the src/native CMakeFiles anyway though.
src/native/libs/System.Security.Cryptography.Native/extra_libs.cmake
Outdated
Show resolved
Hide resolved
src/native/libs/System.Security.Cryptography.Native/opensslshim.c
Outdated
Show resolved
Hide resolved
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.
Thanks, the rest of my comments can be addressed in followup-PRs
Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario.
shell
user executing tests viaadb shell
in the world-writable/data/local/tmp
directory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones)Closes: #66027