Skip to content

Conversation

@secnotes
Copy link

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

cross compile static library for android arm64

Test plan

method 1: download Android NDK

cmake -B build -DCMAKE_TOOLCHAIN_FILE=$NDK_PATH/build/cmake/android.toolchain.cmake -DANDROID_NDK=$NDK_PATH -DANDROID_ABI=arm64-v8a
cmake --build build

method 2: install aarch64-linux-gnu

apt install gcc-aarch64-linux-gnu
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_EXE_LINKER_FLAGS=-static
cmake --build build

Closing issues

close #2771

Copy link
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition!

I meanwhile added examples as well in #2796

Can I cherrypick your PR and add a cross config file for Android there?

Alternatively you can also cherry pick 9ab1712 and 600b325 into this branch and add an Android cross config file as I did it in 9ab1712

@secnotes
Copy link
Author

Feel free to cherry-pick the PR.

@Rot127
Copy link
Collaborator

Rot127 commented Oct 19, 2025

Cherry-picked it into this PR:
#2803

Thanks for the addition!

@Rot127 Rot127 closed this Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to cross compile static library for android arm64

2 participants