zlib: compile Android CPU feature implementation - #65773
Open
luoqianlin wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
luoqianlin
force-pushed
the
android-zlib-cpu-features
branch
from
September 4, 2026 12:34
cb95eea to
c34d3ba
Compare
Signed-off-by: luoqianlin <qianlinluo@foxmail.com>
luoqianlin
force-pushed
the
android-zlib-cpu-features
branch
from
September 4, 2026 12:38
c34d3ba to
37ab30f
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.
Fix the Android zlib build by compiling the Android NDK CPU feature
implementation as part of the zlib target.
On Android,
zlib/cpu_features.ccallsandroid_getCpuFeatures(). Thefunction is implemented by the NDK source
sources/android/cpufeatures/cpu-features.c, but listing only zlib's localsources leaves that implementation out of the link.
The GYP target now builds a small checked-in wrapper that includes that source
through the configured Android NDK include path. This keeps the generated
source and object paths relative to the Node.js checkout, which is required by
the Make and Ninja GYP generators. No machine-specific absolute path is
committed.
NDK r29 with Android API 30 and arm64 is the current validation baseline.
Refs: #65771
Validation:
git diff --checkconfigured NDK CPU feature include path.
android_getCpuFeaturessymbol.