android: Add libcatch2-upstream target am: 810b037e9a
am: dadc5e0392
Change-Id: Idfeb156666158713f384a9bd2eb9f0642187a14a
diff --git a/Android.bp b/Android.bp
index 470c07c..42df9d6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -48,6 +48,17 @@
],
}
+// This rule can be used by other external/ projects that depend on catch2
+// without turning off exceptions.
+cc_library_static {
+ name: "libcatch2-upstream",
+ defaults: [
+ "libcatch2-defaults",
+ ],
+ rtti: true,
+ cflags: ["-fexceptions"],
+}
+
// Configurations meant for validating upstream. Not intended to be used by anything else.
cc_defaults {
@@ -69,12 +80,15 @@
name: "libcatch2-tests-upstream",
defaults: [
"libcatch2-defaults-tests",
- "libcatch2-defaults", // Note: avoid creating a static lib target with exceptions/rtti.
],
gtest: false,
rtti: true,
cflags: ["-fexceptions"],
+
+ whole_static_libs: [
+ "libcatch2-upstream",
+ ],
}
// Android config: RTTI and exceptions are disabled.