framework: add support armv7 and x86_32#1541
Closed
jagobagascon wants to merge 2 commits into
Closed
Conversation
novas0x2a
reviewed
May 28, 2026
|
|
||
| SUPPORTED_CPU = [ | ||
| "aarch64", | ||
| "armv7", |
Collaborator
There was a problem hiding this comment.
don't forget to update triplet_name, too; one way to get the correct value is to run config.guess on the machine in question, or you can use config.sub to normalize from a different platform.
Adds CMAKE support for armv7 and x86_32 architectures. fixes bazel-contrib#1540
8ddfa1f to
a97817d
Compare
Collaborator
|
@jagobagascon can you retest with #1555 and make sure I didn't break it? I did a more comprehensive fix (android and linux use different names for the same cpu family...) |
Contributor
Author
Yes it works. Thank you so much! |
novas0x2a
added a commit
that referenced
this pull request
Jun 4, 2026
…1555) Based on #1541 by @jagobagascon; should fix #1540 (android cmake builds for armeabi-v7a/x86 failing with "target_arch is unknown"). `x86_32` is `i686` everywhere. `armv7` depends on the target OS: Linux reports `armv7l` (`uname -m` / config.guess), but CMake's NDK support only accepts `armv7-a` and `FATAL_ERROR`s on anything else (see [`Android-Determine.cmake`](https://gitlab.kitware.com/cmake/cmake/-/blob/v3.31.12/Modules/Platform/Android-Determine.cmake#L358)), which mirrors the NDK's canonical [`meta/abis.json`](https://android.googlesource.com/platform/ndk/+/refs/tags/ndk-r28c/meta/abis.json) (`armeabi-v7a` -> `armv7-a`, `x86` -> `i686`). So the static `_TARGET_OS_PARAMS` / `_TARGET_ARCH_PARAMS` dicts are replaced with a single `_cmake_target_params(os, arch)` function (mirroring `triplet_name`), with armv7 handled inline as the exception. `triplet_name` gets the config.guess linux triplets `armv7l-unknown-linux-gnueabihf` and `i686-pc-linux-gnu` for the autotools path. (We have no known users of android/autotools, so triplet_name doesn't support it currently). Co-authored-by: Jagoba Gascón <jagoba@arima.eu>
Collaborator
|
should be fixed now! |
Contributor
Author
|
Thank you so much! |
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.
Adds CMAKE support for armv7 and x86_32 architectures.
fixes #1540