simpleperf: use libdexfile_static in fuzzer binary.
Bug: 249956344
Test: run libsimpleperf_report_fuzzer
Change-Id: I6d1bcc53113431201166ad24ecf8bed8c36b3db2
diff --git a/simpleperf/Android.bp b/simpleperf/Android.bp
index fba08d7..b77e99b 100644
--- a/simpleperf/Android.bp
+++ b/simpleperf/Android.bp
@@ -123,11 +123,6 @@
"libc++fs",
],
},
- android: {
- static_libs: [
- "libc",
- ],
- },
linux_glibc_x86_64: {
stl: "libc++_static",
},
@@ -389,6 +384,9 @@
target: {
android: {
static_executable: true,
+ static_libs: [
+ "libc",
+ ],
},
android_arm: {
dist: {
@@ -717,7 +715,7 @@
cc_fuzz {
name: "libsimpleperf_report_fuzzer",
defaults: [
- "simpleperf_shared_libs",
+ "simpleperf_static_libs",
],
host_supported: true,
srcs: [
@@ -725,14 +723,12 @@
],
static_libs: [
"libsimpleperf",
- "libLLVMObject",
- "libLLVMBitReader",
- "libLLVMMC",
- "libLLVMMCParser",
- "libLLVMCore",
- "libLLVMSupport",
],
target: {
+ linux: {
+ // Fuzzer may not be able to load libdexfile. So statically link it.
+ static_libs: ["libdexfile_static"],
+ },
windows: {
enabled: false,
},