[libcxx-commits] [libcxx] [libc++][test][shared] Add @CMAKE_DL_LIBS@ when needed (PR #222797)

Amilendra Kodithuwakku via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 24 02:46:53 PDT 2026


amilendra wrote:

@philnik777 
Sorry for the delay in following up on this.
Is the issue here that "libunwind" is statically linked in the `cxx_experimental ` archive?

```
# | /usr/bin/ld: /work/build/runtimes/libcxx/test-suite-install/lib/libc++experimental.a(libunwind.cpp.o): undefined reference to symbol 'dladdr@@GLIBC_2.17'
```

If that is the issue, then I think the fix would be to change
```
  target_link_libraries(cxx_experimental PRIVATE cxx_shared)
  target_link_libraries(cxx_experimental PRIVATE cxx_static)
```
to 
```
  add_dependencies(cxx_experimental cxx_shared)
  add_dependencies(cxx_experimental cxx_static)
```
.
This would match with the cxx dependency-order declarations.
```
  add_dependencies(cxx cxx_shared)
  add_dependencies(cxx cxx_static)
```

https://github.com/llvm/llvm-project/pull/222797


More information about the libcxx-commits mailing list