Commit 48b2b3e5 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Fix libarttest to be non debug

Previously both libarttest and libarttestd had debug enabled. This
made it hard to know which one was loaded (couldn't look at
kIsDebugBuild).

Fixes test 136 with ART_TEST_RUN_TEST_NDEBUG configuration.

Bug: 28406866

Change-Id: I92983f71374b211f96f5b346fec326ea8543f876
parent 043f8322
This diff is collapsed.
......@@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "art_method-inl.h"
#include "check_reference_map_visitor.h"
#include "jni.h"
......
......@@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "art_method-inl.h"
#include "check_reference_map_visitor.h"
#include "jni.h"
......
......@@ -48,7 +48,8 @@ extern "C" JNIEXPORT void JNICALL Java_Main_destroyJavaVMAndExit(JNIEnv* env, jc
vm->DetachCurrentThread();
// Open ourself again to make sure the native library does not get unloaded from
// underneath us due to DestroyJavaVM. b/28406866
dlopen(kIsDebugBuild ? "libarttestd.so" : "libarttest.so", RTLD_NOW);
void* handle = dlopen(kIsDebugBuild ? "libarttestd.so" : "libarttest.so", RTLD_NOW);
CHECK(handle != nullptr);
vm->DestroyJavaVM();
vm_was_shutdown.store(true);
// Give threads some time to get stuck in ExceptionCheck.
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "art_method.h"
#include "art_method-inl.h"
#include "jit/jit.h"
#include "jit/jit_code_cache.h"
#include "jit/profiling_info.h"
......
......@@ -16,6 +16,7 @@
#include "dex_file.h"
#include "art_method-inl.h"
#include "jit/offline_profiling_info.h"
#include "jit/profile_saver.h"
#include "jni.h"
......
......@@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <assert.h>
#include <iostream>
#include <pthread.h>
#include <stdio.h>
......
......@@ -93,7 +93,12 @@ define build-libarttest
include $(BUILD_SHARED_LIBRARY)
else # host
LOCAL_CLANG := $(ART_HOST_CLANG)
LOCAL_CFLAGS := $(ART_HOST_CFLAGS) $(ART_HOST_DEBUG_CFLAGS)
LOCAL_CFLAGS := $(ART_HOST_CFLAGS)
ifeq ($$(suffix),d)
LOCAL_CFLAGS += $(ART_HOST_DEBUG_CFLAGS)
else
LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
endif
LOCAL_ASFLAGS := $(ART_HOST_ASFLAGS)
LOCAL_LDLIBS := $(ART_HOST_LDLIBS) -ldl -lpthread
LOCAL_IS_HOST_MODULE := true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment