aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar jingwen <jingwen@google.com>2018-03-02 13:51:52 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-02 13:54:21 -0800
commit39e4046dee0b201b411521c9560cfaffe5c6f6d3 (patch)
treeb38f91aee8736bed9dadd03b168e7d388c031bf4 /src/test/java/com/google/devtools/build/lib
parent38916d025875540d19392bb03468c3bbfee5073f (diff)
Add Android NDK r16 support for Bazel.
Changelog: https://android.googlesource.com/platform/ndk/+/ndk-release-r16/CHANGELOG.md > The deprecated headers have been removed. Unified Headers are now simply The Headers. Support for this was added in r15. > libc++ is out of beta and is now the preferred STL in the NDK. Starting in r17, libc++ is the default STL for CMake and standalone toolchains. If you manually selected a different STL, we strongly encourage you to move to libc++. For more details, see this blog post. We bind the default `//external:android/crosstool` in AndroidNdkRepositoryRule before the repository function is evaluated, so changing the default STL will affect the older NDK revisions too. Until we have a new mechanism to specify the default crosstool, users will need to use `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use `libc++`. > GCC, armeabi, mips, mip64 are deprecated but still buildable/useable. We can remove support for these in the r17 configuration. There are no other actionable differences between r15 and r16, so we can reuse the r15 configuration for r16. RELNOTES: Added Android NDK r16 support. Use --cxxopt='-std=c++11` compile with the C++11 standard, and `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use the `libc++` STL. Fixes https://github.com/bazelbuild/bazel/issues/4068 PiperOrigin-RevId: 187664390
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib')
-rw-r--r--src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryTest.java b/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryTest.java
index ff1e417806..c04f0102fc 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryTest.java
@@ -102,7 +102,7 @@ public class AndroidNdkRepositoryTest extends BuildViewTestCase {
eventCollector,
"The revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' "
+ "could not be determined (the revision string found is 'not a valid release string')."
- + " Bazel will attempt to treat the NDK as if it was r15.");
+ + " Bazel will attempt to treat the NDK as if it was r16.");
}
@Test
@@ -128,7 +128,7 @@ public class AndroidNdkRepositoryTest extends BuildViewTestCase {
eventCollector,
"The revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' "
+ "could not be determined (the revision string found is 'invalid package revision'). "
- + "Bazel will attempt to treat the NDK as if it was r15.");
+ + "Bazel will attempt to treat the NDK as if it was r16.");
}
@Test
@@ -145,15 +145,16 @@ public class AndroidNdkRepositoryTest extends BuildViewTestCase {
scratch.overwriteFile(
"/ndk/source.properties",
"Pkg.Desc = Android NDK",
- "Pkg.Revision = 16.0.3675639-beta2");
+ "Pkg.Revision = 17.0.3675639-beta2");
invalidatePackages();
assertThat(getConfiguredTarget("@androidndk//:files")).isNotNull();
MoreAsserts.assertContainsEvent(
eventCollector,
"The major revision of the Android NDK referenced by android_ndk_repository rule "
- + "'androidndk' is 16. The major revisions supported by Bazel are "
- + "[10, 11, 12, 13, 14, 15]. Bazel will attempt to treat the NDK as if it was r15.");
+ + "'androidndk' is 17. The major revisions supported by Bazel are "
+ + "[10, 11, 12, 13, 14, 15, 16]. Bazel will attempt to treat the NDK as if it was "
+ + "r16.");
}
@Test