Skip to content

Conversation

boomanaiden154
Copy link
Contributor

Otherwise when installing the dlfcn.h header, there is a missing reference to Dl_info.h, which causes compilation failures in some cases, notably libunwind.

Otherwise when installing the dlfcn.h header, there is a missing
reference to Dl_info.h, which causes compilation failures in some cases,
notably libunwind.
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2025

@llvm/pr-subscribers-libc

Author: Aiden Grossman (boomanaiden154)

Changes

Otherwise when installing the dlfcn.h header, there is a missing reference to Dl_info.h, which causes compilation failures in some cases, notably libunwind.


Full diff: https://github.com/llvm/llvm-project/pull/156195.diff

2 Files Affected:

  • (modified) libc/include/CMakeLists.txt (+1)
  • (modified) libc/include/llvm-libc-types/CMakeLists.txt (+1)
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 74fcea0f15e2f..8fd37b0ee5ad6 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -70,6 +70,7 @@ add_header_macro(
   dlfcn.h
   DEPENDS
     .llvm_libc_common_h
+    .llvm-libc-types.dl_info
 )
 
 add_header_macro(
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 451beae6f1e6f..fe9e4e397666e 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -72,6 +72,7 @@ add_header(stack_t HDR stack_t.h DEPENDS .size_t)
 add_header(suseconds_t HDR suseconds_t.h)
 add_header(struct_dirent HDR struct_dirent.h DEPENDS .ino_t .off_t)
 add_header(struct_dl_phdr_info HDR struct_dl_phdr_info.h DEPENDS .size_t libc.include.llvm-libc-macros.link_macros)
+add_header(dl_info HDR Dl_info.h)
 add_header(struct_f_owner_ex HDR struct_f_owner_ex.h DEPENDS .pid_t)
 add_header(struct_flock HDR struct_flock.h DEPENDS .off_t .pid_t)
 add_header(struct_flock64 HDR struct_flock64.h DEPENDS .off64_t .pid_t)

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Sep 2, 2025
This patch adds dladdr to the X86 entrypoints and also does the
necessary plumbing so that dladdr.cpp will actually compile.

This depends on llvm#156195.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants