performance tests: static deps

So that we don't need to install the deps on the device or run the
tests in a special environment.

Bug: 122456128
Test: libhwbinder_benchmark, hwbinderThroughputTest, libhwbinder_latency
Change-Id: I51c483b05140fd97c369c954c135ca938a130e4e
diff --git a/vts/performance/Android.bp b/vts/performance/Android.bp
index c5fa2a0..b5097df 100644
--- a/vts/performance/Android.bp
+++ b/vts/performance/Android.bp
@@ -29,14 +29,24 @@
         "libutils",
         "libcutils",
     ],
+
+    static_libs: ["android.hardware.tests.libhwbinder@1.0"],
+
+    // Allow dlsym'ing self for statically linked passthrough implementations
+    ldflags: ["-rdynamic"],
+
+    // impls should never be static, these are used only for testing purposes
+    // and test portability since this test pairs with specific hal
+    // implementations
+    whole_static_libs: [
+        "android.hardware.tests.libhwbinder@1.0-impl",
+    ],
 }
 
 cc_benchmark {
     name: "libhwbinder_benchmark",
     defaults: ["libhwbinder_test_defaults"],
     srcs: ["Benchmark.cpp"],
-    static_libs: ["android.hardware.tests.libhwbinder@1.0"],
-    required: ["android.hardware.tests.libhwbinder@1.0-impl"],
 }
 
 // build for benchmark test based on binder.
@@ -60,8 +70,6 @@
     name: "hwbinderThroughputTest",
     defaults: ["libhwbinder_test_defaults"],
     srcs: ["Benchmark_throughput.cpp"],
-    static_libs: ["android.hardware.tests.libhwbinder@1.0"],
-    required: ["android.hardware.tests.libhwbinder@1.0-impl"],
 }
 
 // build for latency benchmark test for hwbinder.
@@ -73,8 +81,4 @@
         "Latency.cpp",
         "PerfTest.cpp",
     ],
-
-    static_libs: ["android.hardware.tests.libhwbinder@1.0"],
-
-    required: ["android.hardware.tests.libhwbinder@1.0-impl"],
 }