On BSDs, there is no libdl.so, and functions like dlopen are implemented in the main C library instead. Check for the existence of libdl in the main CMakeLists.txt file, and only use it if it exists.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 7611 Build 7611: arc lint + arc unit
Event Timeline
Comment Actions
CMake has a variable CMAKE_DL_LIBS which I believe contains the information you want. It essentially gets defined to "-ldl" on unices that need it and "" on platforms which don't need it.
Comment Actions
Hm, this isn't used in the main LLVM build though. I basically copied what is done in cmake/config-ix.cmake there. But I'll have a look at CMAKE_DL_LIBS, I wonder which version of CMake introduced that variable, the documentation doesn't specify it.