ART: Compile libctstiagent with the NDK
To properly make it available to CTS, compile libctstiagent with the NDK.
Bug: 73206894
Test: mmma art
Change-Id: I1bda81ece3665ed16acd95e2400c23fbc56fe9e9
diff --git a/test/Android.bp b/test/Android.bp
index bf39ec4..4e79b75 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -200,7 +200,11 @@
art_cc_defaults {
name: "libtiagent-base-defaults",
- defaults: ["libartagent-defaults"],
+ defaults: [
+ "art_test_defaults",
+ "art_defaults",
+ // Not derived from libartagent-defaults for NDK.
+ ],
srcs: [
// These are the ART-independent parts.
"ti-agent/agent_common.cc",
@@ -273,8 +277,8 @@
"1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
"1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
],
+ // Use NDK-compatible headers for ctstiagent.
header_libs: [
- "jni_headers",
"libopenjdkjvmti_headers",
],
include_dirs: ["art/test/ti-agent"],
@@ -282,7 +286,10 @@
art_cc_defaults {
name: "libtiagent-defaults",
- defaults: ["libtiagent-base-defaults"],
+ defaults: [
+ "libtiagent-base-defaults",
+ "libartagent-defaults",
+ ],
srcs: [
// This is to get the IsInterpreted native method.
"common/stack_inspect.cc",
@@ -298,9 +305,6 @@
"1940-ddms-ext/ddm_ext.cc",
"1944-sudden-exit/sudden_exit.cc",
],
- shared_libs: [
- "libbase",
- ],
}
art_cc_test_library {
@@ -332,18 +336,25 @@
"983-source-transform-verify/source_transform_slicer.cc",
],
whole_static_libs: [
- "slicer",
- "libz", // for slicer (using adler32).
+ "slicer_ndk",
],
static_libs: [
- "libbase",
+ "libbase_ndk",
],
- header_libs: [
+ shared_libs: [
+ "libz", // for slicer (using adler32).
+ ],
+ sdk_version: "current",
+ stl: "c++_static",
+ cpp_std: "c++14",
+ include_dirs: [
// This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
// many problems with how we export headers that are making doing this the 'right' way
// difficult.
// TODO: move those headers to art/ rather than under runtime.
- "libart_runtime_headers",
+ "art/runtime",
+ // NDK headers aren't available in platform NDK builds.
+ "libnativehelper/include_jni",
],
export_include_dirs: ["ti-agent"],
}