benchmark: Add a build target that's not Android-dependent
Allow building the micronative portion of libartbenchmark as pure JNI without any android
library dependencies.
Bug: 31401609
Change-Id: I99f1466fb668a9ae5dd2f7229dca44d3bb064e15
diff --git a/benchmark/Android.bp b/benchmark/Android.bp
index 94ad015..050100f 100644
--- a/benchmark/Android.bp
+++ b/benchmark/Android.bp
@@ -43,3 +43,31 @@
"-Wno-frame-larger-than=",
],
}
+
+art_cc_library {
+ name: "libartbenchmark-micronative-host",
+ host_supported: true,
+ device_supported: false,
+ defaults: ["art_defaults", "art_debug_defaults"],
+ srcs: [
+ "jni_loader.cc",
+ "micro-native/micro_native.cc",
+ ],
+ shared_libs: [
+ ],
+ static_libs: [
+ ],
+ include_dirs: [
+ "libnativehelper/include/nativehelper" // only for jni.h
+ ],
+ stl: "libc++_static",
+ clang: true,
+ target: {
+ host: {
+ host_ldlibs: ["-ldl", "-lpthread"],
+ },
+ },
+ cflags: [
+ "-Wno-frame-larger-than=",
+ ],
+}