-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[compiler-rt][memprof] Do not add libdl to MEMPROF_UNITTEST_LINK_LIBRARIES #98221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[compiler-rt][memprof] Do not add libdl to MEMPROF_UNITTEST_LINK_LIBRARIES #98221
Conversation
@llvm/pr-subscribers-pgo Author: Alexander Shaposhnikov (alexander-shaposhnikov) ChangesThe memprof tests do not actually depend on libdl. Test plan: ninja check-all Full diff: https://github.com/llvm/llvm-project/pull/98221.diff 1 Files Affected:
diff --git a/compiler-rt/lib/memprof/tests/CMakeLists.txt b/compiler-rt/lib/memprof/tests/CMakeLists.txt
index 0b5c302a4ce5d..a35f12bc14265 100644
--- a/compiler-rt/lib/memprof/tests/CMakeLists.txt
+++ b/compiler-rt/lib/memprof/tests/CMakeLists.txt
@@ -49,7 +49,6 @@ endif()
set(MEMPROF_UNITTEST_LINK_LIBRARIES
${COMPILER_RT_UNWINDER_LINK_LIBS}
${SANITIZER_TEST_CXX_LIBRARIES})
-append_list_if(COMPILER_RT_HAS_LIBDL -ldl MEMPROF_UNITTEST_LINK_LIBRARIES)
# Adds memprof tests for each architecture.
macro(add_memprof_tests_for_arch arch)
|
This fails linking MemProfTests on Linux. sanitizer_linux_libcdep.cpp uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I recall libdl is only needed for dl_iterate_phdrs which is used by some sanitizers (and won't be pulled in implicitly for static linking), but if memprof does not need it we can defintely drop it.
…ARIES (llvm#98221) Remove unnecessary dependency. Test plan: ninja check-all
…INK_LIBRARIES (llvm#98221)" This reverts commit 04f0adc.
The memprof tests do not actually depend on libdl.
They might have a transitive dependency on libdl through the runtime, but the runtime takes care of itself.
Based on the offline discussions it looks like this piece of code in cmake is a historical artifact.
Test plan: ninja check-all