For a while now I have noticed that when I build LLVM using CMake on my OS X machine there are two dynamically linked libraries, BugpointPasses and LLVMHello, that are built with the extension “.so” instead of the extension “.dylib”. This has been causing four test cases to fail when running “make check”.
The attached patch modifies add_llvm_loadable_module in the CMake build system with a piece of logic found in add_clang_library in Clang’s build system. I’m not quite sure what the logic is doing, but it did cause the two preview libraries to be emitted with the correct “.dylib” extension and allowed “make check” to run successfully.
I’ve tested this with the two systems that I regularly build LLVM on:
- Console build, 64-bit OS X but emitting 32-bit libraries
- Console build, 64-bit Linux
The patch has not been tested using XCode or any other build target.
llvm_shared_library.patch (583 Bytes)