-
Notifications
You must be signed in to change notification settings - Fork 61
feat: add Android CMake configuration patch #299
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
Open
xia0pin9
wants to merge
9
commits into
open-quantum-safe:main
Choose a base branch
from
xia0pin9:feat/android-cmake-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…d platforms This commit introduces platform-aware OpenSSL configuration to resolve iOS build issues while maintaining backward compatibility for all platforms. Key changes: - Add configure_openssl() function for intelligent platform detection - Support OQS_USE_OPENSSL environment variable (OFF/ON) for explicit control - Add no_openssl feature flag to force disable OpenSSL on any platform - Auto-disable OpenSSL for iOS targets with Security.framework linking - Enhance CI/CD with iOS cross-compilation testing (x86_64, aarch64) - Add comprehensive unit and integration tests - Update documentation with platform-specific guidance Platform behavior: - iOS: OpenSSL automatically disabled, uses Security.framework - Other platforms: OpenSSL enabled by default (overridable) - Environment variable takes precedence over feature flags This addresses the critical iOS build failures caused by unconditional OpenSSL requirements while enabling embedded systems and compliance use cases that require OpenSSL-free builds. 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
Extends existing iOS platform support to include Android-specific CMake fixes: Platform crypto configuration: - Rename configure_openssl() to configure_platform_crypto() for clarity - Add Android platform detection alongside iOS - Disable OpenSSL for Android (uses native crypto instead) Android CMake fixes: - Add configure_android_cmake() function to override NDK defaults - Force correct ANDROID_ABI settings before project() call - Support all Android architectures: arm64-v8a, armeabi-v7a, x86_64, x86 - Override NDK toolchain's problematic ARMv7 defaults for ARM64 builds This resolves the CMake architecture mixing issue where Android NDK defaults to ARMv7 settings even when building for ARM64 targets. The patch maintains full backward compatibility and extends the existing mobile platform support pattern established for iOS builds. 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
- Try multiple NDK environment variables (ANDROID_NDK_HOME, ANDROID_NDK_ROOT, etc.) - Auto-detect NDK from ANDROID_HOME/ndk if env vars not set - Set CMAKE_TOOLCHAIN_FILE automatically based on detected NDK - Add CMAKE_MAKE_PROGRAM to avoid CMake build tool errors Fixes CMake 'NDK not found' error when cargo-ndk doesn't propagate environment.
Pass reference to toolchain_file instead of moving ownership
Fix CI formatting issues in configure_android_cmake function
Thanks very much for the contribution! Looks good to me. The one thing left blocking the commit is the Developer Certificate of Origin (DCO) sign-off. Would you be able to follow the instructions in https://github.com/open-quantum-safe/liboqs-rust/pull/299/checks?check_run_id=49462652917 to add the DCO sign-off to your commits? |
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.
Extends existing iOS platform support to include Android-specific CMake fixes:
Platform crypto configuration:
Android CMake fixes:
This resolves the CMake architecture mixing issue where Android NDK defaults to ARMv7 settings even when building for ARM64 targets.
The patch maintains full backward compatibility and extends the existing mobile platform support pattern established for iOS builds.