Switch to shared libcutils on host to fix odr-violation
Change-Id: Ia8eb950806a09e12fec2956d51eff99852920bee
SUMMARY: AddressSanitizer: odr-violation: global atrace_is_ready at system/core/libcutils/trace-host.c:23:25
diff --git a/runtime/Android.mk b/runtime/Android.mk
index dde5407..c0e7f47 100644
--- a/runtime/Android.mk
+++ b/runtime/Android.mk
@@ -471,7 +471,7 @@
else # host
LOCAL_SHARED_LIBRARIES += libziparchive-host
# For ashmem_create_region.
- LOCAL_STATIC_LIBRARIES += libcutils
+ LOCAL_SHARED_LIBRARIES += libcutils
endif
LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
LOCAL_ADDITIONAL_DEPENDENCIES += $$(LOCAL_PATH)/Android.mk
diff --git a/test/Android.libnativebridgetest.mk b/test/Android.libnativebridgetest.mk
index 452278a..5a5f725 100644
--- a/test/Android.libnativebridgetest.mk
+++ b/test/Android.libnativebridgetest.mk
@@ -60,7 +60,7 @@
else # host
LOCAL_CLANG := $(ART_HOST_CLANG)
LOCAL_CFLAGS := $(ART_HOST_CFLAGS) $(ART_HOST_DEBUG_CFLAGS)
- LOCAL_STATIC_LIBRARIES := libcutils
+ LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_LDLIBS := $(ART_HOST_LDLIBS) -ldl -lpthread
ifeq ($(HOST_OS),linux)
LOCAL_LDLIBS += -lrt