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

Android NDK r17 support #5371

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@jin
Member

jin commented Jun 11, 2018

Full NDK changelog

Changes related to Bazel's NDK toolchain/CROSSTOOL generation:

  • Removed support for targeting mips, mips64, armeabi.
  • Bumped bundled clang version to 6.0.2.
  • The default STL is now libc++. If Bazel detects that r17 is being used, it
    aliases @androidndk//:default_toolchain to @androidndk//:toolchain-libcpp,
    instead of @androidndk//:toolchain-gnu-libstdcpp.
  • Removed tests that build against armeabi, mips, mips64.
  • Stop passing -fno-integrated-as into the compiler by default.

TODO:

  • Java tests
  • Support for wrap.sh to use with ASANs Implementing in follow up PR.
  • Fix or disable remote caching with android_ndk_integration_test #4663

Fixes #4742

RELNOTES: Added support for Android NDK r17. The default STL is now libc++, and support for targeting mips, mips64 and ARMv5 (armeabi) has been removed.

@googlebot googlebot added the cla: yes label Jun 11, 2018

Add Android NDK r17 support
Changes related to Bazel's NDK toolchain/CROSSTOOL generation:

- Removed support for mips, mips64, armeabi.
- Bumped bundled clang version to 6.0.2.
- The default STL is now libc++. If Bazel detects that r17 is being used, it
  aliases @androidndk//:default_toolchain to @androidndk//:toolchain-libcpp,
  instead of @androidndk//:toolchain-gnu-libstdcpp.
- Removed tests that build against mips and mips64.
- Stop passing `-fno-integrated-as` into the compiler by default.

Change-Id: I7d69a561aaf5ef4ad9dd290eaa2a51c0fd54947f
RELNOTES: Added support for Android NDK r17.

@jin jin force-pushed the jin:ndk-17b branch from bd94bf0 to eacb8dc Jun 11, 2018

@jin jin referenced this pull request Jun 11, 2018

Closed

Support NDK 17 #4742

jin added some commits Jun 11, 2018

Remove support for ARMv5 (armeabi)
Change-Id: I2c8acb9099e11b23c5ec8b162890a0b1a329e9b3
Add 27 and 28 to API/Arch map
Change-Id: Id1ded004c3a80ea62f307746dc3ad6f633f2df2e
bazel build //:foo \
--compiler=clang5.0.300080 \
assert_build :foo \
--compiler=clang6.0.2 \

This comment has been minimized.

@jin

jin Jun 11, 2018

Member

This will "pass" on CI because the test is disabled. The CI has r15, not r17.

@laszlocsomor laszlocsomor requested a review from ahumesky Jun 12, 2018

@jin

This comment has been minimized.

Member

jin commented Jun 25, 2018

@ahumesky ping, PTAL at the core changes. I don't think I will add the support for wrap.sh in this PR, will follow up with that in a following CL. The diff is already quite big with 530 lines added.

@aselle

This comment has been minimized.

aselle commented Jul 11, 2018

I was wondering if there was a way that the (yearly) changes needed to make bazel support the newest version could be streamlined. It would be really cool if this could be synchronized with the android team so that the moment when android releases the ndk, bazel supports it. One of the best features of bazel is that it makes android builds easy, but once a year for about a month it isn't.

@jin

This comment has been minimized.

Member

jin commented Jul 11, 2018

@aselle there a few ways to make this more streamlined, a couple of which are under the Bazel's team purview:

  1. migrate android_ndk_repository to Skylark and store it in rules_android, and decouple the rule development from Bazel core.
  2. Implement support with the next revision as soon as the beta is released. I lagged behind for r17, as I only implemented support after the actual release.
  3. Bundle BUILD files within the NDK. This involves a lot more effort, but could be simplified with a generation tool.

@bazel-io bazel-io closed this in 61a6bea Jul 18, 2018

werkt added a commit to werkt/bazel that referenced this pull request Aug 2, 2018

Android NDK r17 support
[Full NDK changelog](https://github.com/android-ndk/ndk/wiki/Changelog-r17)

Changes related to Bazel's NDK toolchain/CROSSTOOL generation:

- Removed support for targeting mips, mips64, armeabi.
- Bumped bundled clang version to 6.0.2.
- The default STL is now libc++. If Bazel detects that r17 is being used, it
  aliases `@androidndk//:default_toolchain` to `@androidndk//:toolchain-libcpp`,
  instead of `@androidndk//:toolchain-gnu-libstdcpp`.
- Removed tests that build against armeabi, mips, mips64.
- Stop passing `-fno-integrated-as` into the compiler by default.

TODO:

- [x] Java tests
- [x] ~Support for wrap.sh to use with ASANs~ Implementing in follow up PR.
- [ ] Fix or disable remote caching with android_ndk_integration_test bazelbuild#4663

Fixes bazelbuild#4742

RELNOTES: Added support for Android NDK r17. The default STL is now `libc++`, and support for targeting `mips`, `mips64` and `ARMv5` (`armeabi`) has been removed.

Closes bazelbuild#5371.

Change-Id: Id1ded004c3a80ea62f307746dc3ad6f633f2df2e
PiperOrigin-RevId: 205013758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment