From 421de905446320b6f724a930238371cbefdae789 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Wed, 18 Nov 2020 12:17:14 -0800 Subject: [PATCH] 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 --- trusty/libtrusty/Android.bp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/trusty/libtrusty/Android.bp b/trusty/libtrusty/Android.bp index 8dba78d91..708fdbdb5 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 @@ cc_library { 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"], +}