aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gn/BUILD.gn16
-rw-r--r--gn/BUILDCONFIG.gn10
-rw-r--r--infra/bots/assets/android_ndk_darwin/VERSION2
-rwxr-xr-xinfra/bots/assets/android_ndk_darwin/create.py2
-rw-r--r--infra/bots/assets/android_ndk_linux/VERSION2
-rwxr-xr-xinfra/bots/assets/android_ndk_linux/create.py2
6 files changed, 20 insertions, 14 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 5622149d0c..a19394214d 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -174,7 +174,8 @@ config("default") {
]
cflags_cc += [
"-isystem$ndk/sources/android/support/include",
- "-isystem$ndk/sources/cxx-stl/llvm-libc++/libcxx/include",
+ "-isystem$ndk/sources/cxx-stl/llvm-libc++/libcxx/include", # Through r12b.
+ "-isystem$ndk/sources/cxx-stl/llvm-libc++/include", # Since r13.
]
ldflags += [
"--sysroot=$ndk/platforms/$ndk_platform",
@@ -187,6 +188,19 @@ config("default") {
"$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/lib/gcc/$ndk_target/4.9.x",
]
+ if (current_cpu == "mips64el") {
+ # The r13 NDK omits /usr/lib from the MIPS64 sysroots, but Clang searches
+ # for /usr/lib64 as $PATH_TO_USR_LIB/../lib64. If there's no /usr/lib,
+ # it can't find /usr/lib64. We must point Clang at /usr/lib64 manually.
+ lib_dirs += [ "$ndk/platforms/$ndk_platform/usr/lib64" ]
+ ldflags += [
+ # Clang will try to link these two files, but not find them. Again, do it manually.
+ "-nostartfiles",
+ "$ndk/platforms/$ndk_platform/usr/lib64/crtbegin_dynamic.o",
+ "$ndk/platforms/$ndk_platform/usr/lib64/crtend_android.o",
+ ]
+ }
+
libs = [
# Order matters here! Keep these three in exactly this order.
"c++_static",
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index 2f8670a563..eccffdb924 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -11,7 +11,7 @@ declare_args() {
is_official_build = false
is_component_build = false
ndk = ""
- ndk_api = 0 # 0 == picked automatically for target_cpu.
+ ndk_api = 21
sanitize = ""
}
declare_args() {
@@ -55,14 +55,6 @@ if (is_android) {
ndk_stdlib = ""
ndk_gccdir = ""
- if (ndk_api == 0) {
- ndk_api = 18
- if (target_cpu == "arm64" || target_cpu == "mips64el" ||
- target_cpu == "x64") {
- ndk_api = 21
- }
- }
-
if (host_os == "linux") {
ndk_host = "linux-x86_64"
} else if (host_os == "mac") {
diff --git a/infra/bots/assets/android_ndk_darwin/VERSION b/infra/bots/assets/android_ndk_darwin/VERSION
index c227083464..56a6051ca2 100644
--- a/infra/bots/assets/android_ndk_darwin/VERSION
+++ b/infra/bots/assets/android_ndk_darwin/VERSION
@@ -1 +1 @@
-0 \ No newline at end of file
+1 \ No newline at end of file
diff --git a/infra/bots/assets/android_ndk_darwin/create.py b/infra/bots/assets/android_ndk_darwin/create.py
index 818ec5ac37..99165d4b87 100755
--- a/infra/bots/assets/android_ndk_darwin/create.py
+++ b/infra/bots/assets/android_ndk_darwin/create.py
@@ -15,7 +15,7 @@ import os.path
import shutil
import subprocess
-NDK_VER = "android-ndk-r12b"
+NDK_VER = "android-ndk-r13"
NDK_URL = \
"https://dl.google.com/android/repository/%s-darwin-x86_64.zip" % NDK_VER
diff --git a/infra/bots/assets/android_ndk_linux/VERSION b/infra/bots/assets/android_ndk_linux/VERSION
index bf0d87ab1b..7813681f5b 100644
--- a/infra/bots/assets/android_ndk_linux/VERSION
+++ b/infra/bots/assets/android_ndk_linux/VERSION
@@ -1 +1 @@
-4 \ No newline at end of file
+5 \ No newline at end of file
diff --git a/infra/bots/assets/android_ndk_linux/create.py b/infra/bots/assets/android_ndk_linux/create.py
index 7bde83ad0f..62652abf53 100755
--- a/infra/bots/assets/android_ndk_linux/create.py
+++ b/infra/bots/assets/android_ndk_linux/create.py
@@ -15,7 +15,7 @@ import os.path
import shutil
import subprocess
-NDK_VER = "android-ndk-r12b"
+NDK_VER = "android-ndk-r13"
NDK_URL = \
"https://dl.google.com/android/repository/%s-linux-x86_64.zip" % NDK_VER