summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/jni/jni_compiler_test.cc6
-rw-r--r--test/Android.bp17
2 files changed, 8 insertions, 15 deletions
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
index 77ebff6da2..8a096d0744 100644
--- a/compiler/jni/jni_compiler_test.cc
+++ b/compiler/jni/jni_compiler_test.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
+#include <math.h>
+
#include <memory>
#include <type_traits>
-#include <math.h>
-
#include "art_method-inl.h"
#include "base/bit_utils.h"
#include "base/casts.h"
@@ -40,7 +40,7 @@
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
#include "mirror/stack_trace_element-inl.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
#include "nativeloader/native_loader.h"
#include "oat/oat_quick_method_header.h"
#include "runtime.h"
diff --git a/test/Android.bp b/test/Android.bp
index 85fafdd215..988dd3e5d7 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -260,18 +260,11 @@ art_cc_defaults {
header_libs: [
"libnativeloader-headers",
- ],
- shared_libs: [
- // `libart(d)` (`art/runtime/jni/java_vm_ext.cc`) and `libnativehelper`
- // (`libnativehelper/JniInvocation.c`) define symbols with the same name
- // (e.g. `JNI_GetDefaultJavaVMInitArgs`).
- // `JavaVmExtTest#*` tests require `libart(d)` implementation of these symbols.
- // At the moment `libart(d)` is linked statically (through `libart(d)-gtest`)
- // and these symbols are correctly resolved to `libart(d)`.
- // If `libnativehelper` and `libart(d)` are both linked dynamically,
- // `libart(d)` must be specified in shared_libs list before `libnativehelper`,
- // so that its symbols have precedence over `libnativehelper`.
- "libnativehelper",
+ // The full libnativehelper library has wrappers for the JNI APIs (e.g.
+ // `JNI_CreateJavaVM`) that are implemented in libart(d), so it
+ // shouldn't be linked into the tests where libart(d) is linked
+ // statically.
+ "libnativehelper_header_only",
],
target: {
android: {