Merge "Update Android.bp with recent Android.mk changes"
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 81479d5..1123163 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -211,8 +211,6 @@
   dlclose(handle);
 }
 
-// ifuncs are only supported on intel and arm64 for now
-#if defined (__aarch64__) || defined(__i386__) || defined(__x86_64__)
 TEST(dlfcn, ifunc) {
   typedef const char* (*fn_ptr)();
 
@@ -256,7 +254,6 @@
   ASSERT_STREQ("true", is_ctor_called());
   dlclose(handle);
 }
-#endif
 
 TEST(dlfcn, dlopen_check_relocation_dt_needed_order) {
   // This is the structure of the test library and
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 506d6f2..a903732 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -346,25 +346,14 @@
 libtest_ifunc_src_files := \
     dlopen_testlib_ifunc.c
 
+# TODO(dimitry): clang does not support ifunc attribute
 libtest_ifunc_clang_host := false
+libtest_ifunc_clang_target := false
+
 module := libtest_ifunc
 build_target := SHARED_LIBRARY
 
-build_type := host
-include $(TEST_PATH)/Android.build.mk
-
-ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm64 x86 x86_64))
-    ifeq ($(TARGET_ARCH),arm64)
-      libtest_ifunc_multilib := 64
-      # TODO: This is a workaround - remove it once gcc
-      # removes its Android ifunc checks
-      libtest_ifunc_cflags := -mglibc
-    endif
-
-    build_type := target
-    libtest_ifunc_clang_target := false
-    include $(TEST_PATH)/Android.build.mk
-endif
+include $(LOCAL_PATH)/Android.build.testlib.mk
 
 # -----------------------------------------------------------------------------
 # Library used by atexit tests