Add missing host ldlibs
Host builds were compiling without -Wl,--no-undefined. Add missing
host ldlibs so that -Wl,--no-undefined can be added again.
Test: m -j host
Bug: 32305815
Change-Id: I456098775ead2bddae3e61c7055b2bde3f6b38ff
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index e1a4239..fe0d6ab 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -363,6 +363,9 @@
android: {
shared_libs: ["libdl"],
},
+ host: {
+ host_ldlibs: ["-ldl"],
+ },
},
}
@@ -372,6 +375,14 @@
defaults: ["bionic_testlib_defaults"],
srcs: ["dlsym_from_this_functions.cpp"],
shared_libs: ["libtest_dlsym_from_this_grandchild"],
+ target: {
+ android: {
+ shared_libs: ["libdl"],
+ },
+ host: {
+ host_ldlibs: ["-ldl"],
+ },
+ },
}
// -----------------------------------------------------------------------------
@@ -410,6 +421,9 @@
android: {
shared_libs: ["libdl"],
},
+ host: {
+ host_ldlibs: ["-ldl"],
+ },
},
}
diff --git a/tests/libs/Android.build.dt_runpath.mk b/tests/libs/Android.build.dt_runpath.mk
index 2a6d3b3..60844e5 100644
--- a/tests/libs/Android.build.dt_runpath.mk
+++ b/tests/libs/Android.build.dt_runpath.mk
@@ -67,6 +67,7 @@
libtest_dt_runpath_d_shared_libraries := libtest_dt_runpath_b libtest_dt_runpath_c
libtest_dt_runpath_d_ldflags := -Wl,--rpath,\$${ORIGIN}/dt_runpath_b_c_x -Wl,--enable-new-dtags
+libtest_dt_runpath_d_ldlibs := -ldl
module := libtest_dt_runpath_d
include $(LOCAL_PATH)/Android.build.testlib.mk
@@ -78,6 +79,7 @@
libtest_dt_runpath_d_zip_shared_libraries := libtest_dt_runpath_b libtest_dt_runpath_c
libtest_dt_runpath_d_zip_ldflags := -Wl,--rpath,\$${ORIGIN}/dt_runpath_b_c_x -Wl,--enable-new-dtags
+libtest_dt_runpath_d_zip_ldlibs := -ldl
libtest_dt_runpath_d_zip_install_to_out_data_dir := $(module)
module_tag := optional