aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-12-14 13:17:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-14 19:15:18 +0000
commitb7ce80b7149209dfcdb8757d39a627e8dcccefea (patch)
treed71f711230bf6518c4b4d10926cc2ef620f44ce4 /gn
parente305cc1f2a44e47d6a0dcc0ff34e2692349aed5d (diff)
switch to libstdc++ for standalone Android builds.
This makes it possible to target NDK API 18 (K) again. Change-Id: Id3d1f19b2904792b4001d2ea0942cc1ab6cf732e Reviewed-on: https://skia-review.googlesource.com/6081 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn')
-rw-r--r--gn/BUILD.gn16
-rw-r--r--gn/BUILDCONFIG.gn6
2 files changed, 9 insertions, 13 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index a52690da17..ef01130b67 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -158,8 +158,8 @@ config("default") {
]
cflags_cc += [
"-isystem$ndk/sources/android/support/include",
- "-isystem$ndk/sources/cxx-stl/llvm-libc++/libcxx/include", # Through r12b.
- "-isystem$ndk/sources/cxx-stl/llvm-libc++/include", # Since r13.
+ "-isystem$ndk/sources/cxx-stl/gnu-libstdc++/4.9/include",
+ "-isystem$ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/$ndk_stdlib/include",
]
ldflags += [
"--sysroot=$ndk/platforms/$ndk_platform",
@@ -167,7 +167,7 @@ config("default") {
"-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
]
lib_dirs = [
- "$ndk/sources/cxx-stl/llvm-libc++/libs/$ndk_stdlib",
+ "$ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/$ndk_stdlib",
"$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/lib/gcc/$ndk_target/4.9.x",
]
@@ -179,15 +179,7 @@ config("default") {
ldflags += [ "-B$ndk/platforms/$ndk_platform/usr/lib64" ]
}
- libs += [
- # Order matters here! Keep these three in exactly this order.
- "c++_static",
- "c++abi",
- "android_support",
- ]
- if (target_cpu == "arm") {
- libs += [ "unwind" ]
- }
+ libs += [ "gnustl_static" ]
}
if (is_ios) {
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index a775d499b6..a03ea82a43 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -11,7 +11,11 @@ declare_args() {
is_official_build = false
is_component_build = false
ndk = ""
- ndk_api = 21
+ if (target_cpu == "x86" || target_cpu == "mipsel" || target_cpu == "arm") {
+ ndk_api = 18
+ } else {
+ ndk_api = 21
+ }
sanitize = ""
}
declare_args() {