Browse Source

support specify C++ STL for android

yejianwu 6 years ago
parent
commit
df4ec8a273
1 changed files with 16 additions and 0 deletions
  1. 16 0
      BUILD

+ 16 - 0
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.
 # Android and MSVC builds do not need to link in a separate pthread library.
 LINK_OPTS = select({
 LINK_OPTS = select({
     ":android": [],
     ":android": [],
+    ":android-libcpp": [],
+    ":android-gnu-libstdcpp": [],
     ":msvc": [
     ":msvc": [
         # Suppress linker warnings about files with no symbols defined.
         # Suppress linker warnings about files with no symbols defined.
         "-ignore:4221",
         "-ignore:4221",