From df4ec8a2732b60dcc13a1f7020f5cf064cb8b4ce Mon Sep 17 00:00:00 2001 From: yejianwu Date: Tue, 2 Apr 2019 20:08:37 +0800 Subject: [PATCH] support specify C++ STL for android --- BUILD | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/BUILD b/BUILD index d64be8371..f1e94a588 100644 --- a/BUILD +++ b/BUILD @@ -69,9 +69,25 @@ config_setting( }, ) +config_setting( + name = "android-libcpp", + values = { + "crosstool_top": "@androidndk//:toolchain-libcpp", + }, +) + +config_setting( + name = "android-gnu-libstdcpp", + values = { + "crosstool_top": "@androidndk//:toolchain-gnu-libstdcpp", + }, +) + # Android and MSVC builds do not need to link in a separate pthread library. LINK_OPTS = select({ ":android": [], + ":android-libcpp": [], + ":android-gnu-libstdcpp": [], ":msvc": [ # Suppress linker warnings about files with no symbols defined. "-ignore:4221",