Modernize Android 3p build scripts for current NDK/CMake - #388
Open
byrcolin wants to merge 1 commit into
Open
Conversation
- Toolchain: opt out of the legacy NDK toolchain wrapper, which is broken with CMake 4.x - mikkelsen: remove hardcoded NDK r21d path (use LY_NDK_DIR env var), drop API level pin (toolchain enforces/defaults to 24), remove obsolete arm32 flags (ANDROID_ARM_MODE/ANDROID_ARM_NEON) that modern NDKs reject - zlib: pass CMAKE_POLICY_VERSION_MINIMUM=3.5 so zlib's ancient cmake_minimum_required configures under CMake 4.x - gitignore: exclude build/ folders Verified: mikkelsen (debug+release via Ninja Multi-Config) and zlib build with NDK r27.3 / CMake 4.1 Signed-off-by: colinb <colinb@accesspointmg.com>
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.
What does this PR do?
Fixes the Android 3p package build scripts so they work with current NDK and CMake versions. No functional change to package outputs.
ANDROID_USE_LEGACY_TOOLCHAIN_FILE OFF), which is broken with CMake 4.xLY_NDK_DIRenv var, which the toolchain already supports), drop the API level pin (toolchain enforces and defaults to 24), remove obsolete arm32 flags (ANDROID_ARM_MODE/ANDROID_ARM_NEONmodern NDKs hard-error on disabling NEON, and both are meaningless for arm64-v8a)CMAKE_POLICY_VERSION_MINIMUM=3.5so zlib's ancientcmake_minimum_required(VERSION 2.4.4)configures under CMake 4.x (must be on the command line the top-level version check runs before the toolchain file is read)build/foldersHow was this tested?
Built with NDK r27.3.13750724 / CMake 4.1 on Windows:
build_zlib_android.cmdlinkslibz.acleanlyRelated
Prerequisite for the Android 16KB page alignment work: RFC o3de/o3de#19936