Reapply 91184 with fixes and an addition to the testcase to cover the problem
[oota-llvm.git] / lib / System / CMakeLists.txt
index 2945e33d5b1cccf7faf49339492c8995849ac1af..a56a1f78bb72a88ad0ba6ea9675a90d4361ae438 100644 (file)
@@ -42,5 +42,5 @@ add_llvm_library(LLVMSystem
   )
 
 if( BUILD_SHARED_LIBS AND NOT WIN32 )
-  target_link_libraries(LLVMSystem dl)
+  target_link_libraries(LLVMSystem ${CMAKE_DL_LIBS})
 endif()