Index: tools/gn/secondary/testing/gtest/BUILD.gn |
diff --git a/tools/gn/secondary/testing/gtest/BUILD.gn b/tools/gn/secondary/testing/gtest/BUILD.gn |
index 91b755fb3c0e7f7133ab52394ba9ae39de28afe1..90f027d173be3821a8a60fa35c06ca4666f32285 100644 |
--- a/tools/gn/secondary/testing/gtest/BUILD.gn |
+++ b/tools/gn/secondary/testing/gtest/BUILD.gn |
@@ -35,6 +35,21 @@ config("gtest_config") { |
"GTEST_HAS_RTTI=0", |
] |
} |
+ |
+ if (is_android) { |
+ defines += [ |
+ # We want gtest features that use tr1::tuple, but we currently |
+ # don't support the variadic templates used by libstdc++'s |
+ # implementation. gtest supports this scenario by providing its |
+ # own implementation but we must opt in to it. |
+ "GTEST_USE_OWN_TR1_TUPLE=1", |
+ |
+ # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. |
+ # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 |
+ # automatically on android, so it has to be set explicitly here. |
+ "GTEST_HAS_TR1_TUPLE=1", |
+ ] |
+ } |
} |
static_library("gtest") { |