Skip to content
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

Add support for NDK r25 #44

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

tnovak
Copy link
Contributor

@tnovak tnovak commented May 8, 2023

Includes a few tweaks needed to build bpftools with a recent NDK:

  • Libcxx prebuilts are no longer included in sources/cxx-stl [1], so use the sysroot path instead.
  • NDK now defaults to android-legacy.toolchain.cmake [2], irrespective of CMake version. With the legacy toolchain some env variables we set such as LDFLAGS aren't used, leading to build errors. Force the use of new toolchain file and switch to CXXFLAGS as opposed to CMAKE_CXX_FLAGS to avoid overriding toolchain defaults [3].

Test: make NDK_PATH=/opt/ndk/android-ndk-r25c bpftools-min

[1] https://android-review.googlesource.com/c/platform/ndk/+/2051541
[2] https://android-review.googlesource.com/c/platform/ndk/+/2064269
[3] android/ndk#1693

Includes a few tweaks needed to build bpftools with a recent NDK:

- Libcxx prebuilts are no longer included in sources/cxx-stl [1], so
  use the sysroot path instead.
- NDK now defaults to android-legacy.toolchain.cmake [2], irrespective of
  CMake version. With the legacy toolchain some env variables we set such
  as LDFLAGS aren't used, leading to build errors. Force the use of new
  toolchain file and switch to CXXFLAGS as opposed to CMAKE_CXX_FLAGS
  to avoid overriding toolchain defaults [3].

Test: make NDK_PATH=/opt/ndk/android-ndk-r25c bpftools-min

[1] https://android-review.googlesource.com/c/platform/ndk/+/2051541
[2] https://android-review.googlesource.com/c/platform/ndk/+/2064269
[3] android/ndk#1693
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 8, 2023
@michalgr michalgr merged commit 9b490a2 into facebookexperimental:main May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants