From c6606de1d242d11d3681b6046facc177fc15aa92 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Thu, 6 Jan 2022 00:07:23 +0800 Subject: [PATCH] Fix android build --- src/base/BUILD.gn | 2 +- src/buildtools/third_party/libc++abi/BUILD.gn | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/base/BUILD.gn b/src/base/BUILD.gn index b67ce57213..94497a564e 100644 --- a/src/base/BUILD.gn +++ b/src/base/BUILD.gn @@ -1475,7 +1475,7 @@ mixed_component("base") { # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. if (!use_sysroot && - (is_android || ((is_linux || is_chromeos) && !is_chromecast)) && + ((is_linux || is_chromeos) && !is_chromecast) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } diff --git a/src/buildtools/third_party/libc++abi/BUILD.gn b/src/buildtools/third_party/libc++abi/BUILD.gn index ce35ff9660..39db8748d4 100644 --- a/src/buildtools/third_party/libc++abi/BUILD.gn +++ b/src/buildtools/third_party/libc++abi/BUILD.gn @@ -112,4 +112,15 @@ source_set("libc++abi") { "//build/config/compiler:no_rtti", ] } + if (is_android) { + sources += [ + "trunk/src/private_typeinfo.cpp", + ] + configs -= [ + "//build/config/compiler:no_rtti", + ] + configs += [ + "//build/config/compiler:rtti", + ] + } }