X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cmake%2Fmodules%2FLLVMConfig.cmake;h=0744b50d648f078bb8c36de15035bb6c2cb2fdab;hb=9e6d1d1f5034347d237941f1bf08fba5c1583cd3;hp=d1c297c1586144ed200b35d7202a5d59c33ef114;hpb=dfcb9bfcc01c4010c167886caae47252aab1b261;p=oota-llvm.git diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index d1c297c1586..0744b50d648 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -5,7 +5,7 @@ function(get_system_libs return_var) set(system_libs ${system_libs} imagehlp psapi) elseif( CMAKE_HOST_UNIX ) if( HAVE_LIBDL ) - set(system_libs ${system_libs} dl) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) endif() if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) set(system_libs ${system_libs} pthread) @@ -32,7 +32,7 @@ endfunction(explicit_llvm_config) function(explicit_map_components_to_libraries out_libs) set( link_components ${ARGN} ) foreach(c ${link_components}) - # add codegen, asmprinter, asmparser + # add codegen, asmprinter, asmparser, disassembler list(FIND LLVM_TARGETS_TO_BUILD ${c} idx) if( NOT idx LESS 0 ) list(FIND llvm_libs "LLVM${c}CodeGen" idx) @@ -58,6 +58,10 @@ function(explicit_map_components_to_libraries out_libs) if( NOT asmidx LESS 0 ) list(APPEND expanded_components "LLVM${c}Info") endif() + list(FIND llvm_libs "LLVM${c}Disassembler" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}Disassembler") + endif() elseif( c STREQUAL "native" ) list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen") elseif( c STREQUAL "nativecodegen" )