[llvm-commits] [llvm] r127546 - in /llvm/trunk/cmake/modules: AddLLVM.cmake LLVMConfig.cmake

Oscar Fuentes ofv at wanadoo.es
Sat Mar 12 08:48:54 PST 2011


Author: ofv
Date: Sat Mar 12 10:48:54 2011
New Revision: 127546

URL: http://llvm.org/viewvc/llvm-project?rev=127546&view=rev
Log:
Whe we build a shared library, add its list of used libraries to the
link command.

Fixed a pair of IF expressions too.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake
    llvm/trunk/cmake/modules/LLVMConfig.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=127546&r1=127545&r2=127546&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Sat Mar 12 10:48:54 2011
@@ -10,6 +10,7 @@
   endif( LLVM_COMMON_DEPENDS )
 
   if( BUILD_SHARED_LIBS )
+    llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
     get_system_libs(sl)
     target_link_libraries( ${name} ${sl} )
   endif()
@@ -45,6 +46,10 @@
     add_library( ${name} ${libkind} ${ALL_FILES} )
     set_target_properties( ${name} PROPERTIES PREFIX "" )
 
+    llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
+    get_system_libs(sl)
+    target_link_libraries( ${name} ${sl} )
+
     if (APPLE)
       # Darwin-specific linker flags for loadable modules.
       set_target_properties(${name} PROPERTIES

Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake?rev=127546&r1=127545&r2=127546&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake Sat Mar 12 10:48:54 2011
@@ -64,13 +64,13 @@
 
   # Expand some keywords:
   list(FIND link_components "engine" engine_required)
-  if( engine_required )
+  if( NOT engine_required STREQUAL "-1" )
     # TODO: as we assume we are on X86, this is `jit'.
     list(APPEND link_components "jit")
     list(APPEND link_components "native")
   endif()
   list(FIND link_components "native" native_required)
-  if( native_required )
+  if( NOT native_required STREQUAL "-1" )
     list(APPEND link_components "X86")
   endif()
 





More information about the llvm-commits mailing list