ART: Refactor libctstiagent build
Refactor the build to include platform dependencies statically
and wholesale, so the file does not depend on libraries on
device.
Bug: 73206894
Test: m test-art-host
Change-Id: Iae5b3eaa3d192540ce858ca8e8aedcfe4d7266d5
diff --git a/test/Android.bp b/test/Android.bp
index 72e8eee..86f81be 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -267,12 +267,8 @@
"1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
"1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
],
- shared_libs: [
- "libdexfile",
- "libbase",
- ],
header_libs: [
- "libnativehelper_header_only",
+ "jni_headers",
"libopenjdkjvmti_headers",
],
include_dirs: ["art/test/ti-agent"],
@@ -295,6 +291,10 @@
"983-source-transform-verify/source_transform.cc",
"1940-ddms-ext/ddm_ext.cc",
],
+ shared_libs: [
+ "libbase",
+ "libdexfile",
+ ],
}
art_cc_test_library {
@@ -312,6 +312,25 @@
shared_libs: ["libartd"],
}
+art_cc_test_library {
+ name: "libctstiagent",
+ defaults: ["libtiagent-base-defaults"],
+ whole_static_libs: [
+ "libdexfile",
+ "libz",
+ "libziparchive",
+ ],
+ static_libs: [
+ "libbase",
+ "libcutils",
+ "libutils",
+ ],
+ shared_libs: [
+ "liblog",
+ ],
+ export_include_dirs: ["ti-agent"],
+}
+
art_cc_defaults {
name: "libtistress-defaults",
defaults: ["libartagent-defaults"],
@@ -340,12 +359,6 @@
shared_libs: ["libartd"],
}
-art_cc_test_library {
- name: "libctstiagent",
- defaults: ["libtiagent-base-defaults"],
- export_include_dirs: ["ti-agent"],
-}
-
cc_defaults {
name: "libarttest-defaults",
defaults: [