aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
diff options
context:
space:
mode:
authorGravatar Derek Sollenberger <djsollen@google.com>2017-06-27 11:55:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-27 16:32:15 +0000
commit19b2a56ad7901796b2ee7af57f745d7c92c77e09 (patch)
treedf345674121b33044857e189a0461dda572da210 /gn/BUILD.gn
parent52fb02edf2b9a1001ede37a33c00819de81dbdf4 (diff)
Upgrade android build (and infrastructure) to use ndk r15.
Bug: 6672 Change-Id: Ia6c6bae8a9adfd75172d7116487dfa63c3d69670 Reviewed-on: https://skia-review.googlesource.com/20904 Commit-Queue: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'gn/BUILD.gn')
-rw-r--r--gn/BUILD.gn23
1 files changed, 10 insertions, 13 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 96da6775ec..fdd50b1a11 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -167,10 +167,10 @@ config("default") {
"-mthumb",
]
} else if (current_cpu == "mipsel") {
- cflags += [
- "-no-integrated-as", # Clang <4.0 doesn't understand 'usw' mnemonic.
- "-march=mips32r2",
- ]
+ cflags += [ "-march=mips32r2" ]
+ } else if (current_cpu == "mips64el") {
+ asmflags += [ "-integrated-as" ]
+ cflags += [ "-integrated-as" ]
} else if (current_cpu == "x86" && !is_win) {
asmflags += [ "-m32" ]
cflags += [
@@ -192,14 +192,12 @@ config("default") {
}
if (is_android) {
- asmflags += [
- "--target=$ndk_target",
- "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
- ]
+ asmflags += [ "--target=$ndk_target" ]
cflags += [
- "--sysroot=$ndk/platforms/$ndk_platform",
+ "--sysroot=$ndk/sysroot",
+ "-isystem$ndk/sysroot/usr/include/$ndk_target",
+ "-D__ANDROID_API__=$ndk_api",
"--target=$ndk_target",
- "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
]
cflags_cc += [
"-isystem$ndk/sources/android/support/include",
@@ -217,9 +215,8 @@ config("default") {
]
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.
+ # The r15b NDK deployed on our bots fails to find /usr/lib64 in the
+ # MIPS64 sysroots, so we must point Clang at /usr/lib64 manually.
lib_dirs += [ "$ndk/platforms/$ndk_platform/usr/lib64" ]
ldflags += [ "-B$ndk/platforms/$ndk_platform/usr/lib64" ]
}