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>
This commit is contained in:
parent
e305cc1f2a
commit
b7ce80b714
16
gn/BUILD.gn
16
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) {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user