trusty: Add libtrusty_test
Used by tests on the system side of the Treble boundary, e.g. fuzzing
Test: m libtrusty libtrusty_test
Change-Id: I56a15c80eb7c4b9e51f8e59a7cd1abdfc35d8d5a
diff --git a/trusty/libtrusty/Android.bp b/trusty/libtrusty/Android.bp
index 8dba78d..708fdbd 100644
--- a/trusty/libtrusty/Android.bp
+++ b/trusty/libtrusty/Android.bp
@@ -12,10 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-cc_library {
- name: "libtrusty",
- vendor: true,
-
+cc_defaults {
+ name: "libtrusty_defaults",
srcs: ["trusty.c"],
export_include_dirs: ["include"],
cflags: [
@@ -25,3 +23,16 @@
shared_libs: ["liblog"],
}
+
+cc_library {
+ name: "libtrusty",
+ vendor: true,
+ defaults: ["libtrusty_defaults"],
+}
+
+// TODO(b/170753563): cc_fuzz can't deal with vendor components. Build libtrusty
+// for system.
+cc_test_library {
+ name: "libtrusty_test",
+ defaults: ["libtrusty_defaults"],
+}