Add Android platform support for dynlink module#620
Draft
yug105 wants to merge 6 commits intometacall:developfrom
Draft
Add Android platform support for dynlink module#620yug105 wants to merge 6 commits intometacall:developfrom
yug105 wants to merge 6 commits intometacall:developfrom
Conversation
- Add dynlink_impl_android.h header file - Add dynlink_impl_android.c implementation using dlopen/dlsym/dlclose - Update dynlink_interface.h to detect Android via __ANDROID__ macro - Update Portability.cmake to set PROJECT_OS_FAMILY to android - Add android-test.yml CI workflow for building and testing on Android Relates to metacall#232
- Fix CI workflow: disable OPTION_BUILD_TESTS to avoid CMake error with undefined add_loader_dependencies function - Add custom dynlink test program that validates Android implementation - Fix clang-format violations in dynlink_impl_android.c
- Set OPTION_BUILD_LOADERS=ON (only mock/ext build by default) - Set OPTION_BUILD_CLI=OFF (skip node_loader dependency) - Set OPTION_BUILD_TESTS=ON to enable ctest - Run test executables on Android emulator
Pass Android toolchain and platform variables to GTest ExternalProject: - CMAKE_TOOLCHAIN_FILE for Android NDK toolchain - CMAKE_MAKE_PROGRAM for Ninja - ANDROID_ABI, ANDROID_PLATFORM, ANDROID_STL, ANDROID_NDK - CMAKE_GENERATOR to use same generator as parent project
172c468 to
465e60c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
dlopen/dlsym/dlclosefrom Android's Bionic libcChanges
source/dynlink/include/dynlink/dynlink_impl_android.h- Header file for Android implementationsource/dynlink/source/dynlink_impl_android.c- Implementation using POSIX dlfcn.h functionssource/dynlink/include/dynlink/dynlink_interface.h- Added Android detection via__ANDROID__macrocmake/Portability.cmake- SetPROJECT_OS_FAMILYtoandroidfor Android builds.github/workflows/android-test.yml- CI workflow for Android builds and emulator testsTest Plan
Relates to #232