[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 26 06:24:13 PDT 2025


================
@@ -20,7 +20,6 @@ target_link_libraries(CoreTests
   LLVMBOLTRewrite
   LLVMBOLTProfile
   LLVMBOLTUtils
-  LLVMTestingSupport
   )
----------------
rnk wrote:

This removal here was interesting. Bolt doesn't support the LLVM dylib build, and it tries to disable linking the LLVM dylib. However, it ends up depending on it transitively through LLVMTestingSupport, resulting in double registration of command line flags due to two copies of Support libraries, static and from the dylib. I think it should be possible to link LLVMTestingSupport as a single static archive and not reference the dylib, but I couldn't figure that out. In the end, I cut the library dependency because it was easier.

This library dependency was introduced in Dec 2024 51003076ebc1ccc0cf339f9d96b2cfec84ab867c and I think it breaks building bolt with cmake and the dylib build enabled, so I think that was actually a regression in functionality, but I need to confirm it.

Anyway, I think this will finally pass premerge checks.

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


More information about the cfe-commits mailing list