summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-03-09 14:44:46 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-03-09 14:44:46 +0000
commit5eae24e199a22fa7fd8bdf3dd50f814f1b6aadbd (patch)
treee5b1fc96266f8d52ec777e28935372f96550e188 /cmake
parent8104163fd14a1a429800c97f82346614590de8c2 (diff)
downloadllvm-5eae24e199a22fa7fd8bdf3dd50f814f1b6aadbd.tar.gz
llvm-5eae24e199a22fa7fd8bdf3dd50f814f1b6aadbd.tar.bz2
llvm-5eae24e199a22fa7fd8bdf3dd50f814f1b6aadbd.tar.xz
Process some link components that map to other expandable components
before the main loop. This is necessary because the loop ignores the items added to `link_components' after it is entered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/modules/LLVMConfig.cmake18
1 files changed, 15 insertions, 3 deletions
diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake
index 349544edc3..e8308f680b 100755
--- a/cmake/modules/LLVMConfig.cmake
+++ b/cmake/modules/LLVMConfig.cmake
@@ -61,6 +61,19 @@ function(explicit_map_components_to_libraries out_libs)
set( link_components ${ARGN} )
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
string(TOUPPER "${llvm_libs}" capitalized_libs)
+
+ # Expand some keywords:
+ list(FIND link_components "engine" engine_required)
+ if( engine_required )
+ # 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 )
+ list(APPEND link_components "X86")
+ endif()
+
# Translate symbolic component names to real libraries:
foreach(c ${link_components})
# add codegen, asmprinter, asmparser, disassembler
@@ -94,14 +107,13 @@ function(explicit_map_components_to_libraries out_libs)
list(APPEND expanded_components "LLVM${c}Disassembler")
endif()
elseif( c STREQUAL "native" )
- list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+ # already processed
elseif( c STREQUAL "nativecodegen" )
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
elseif( c STREQUAL "backend" )
# same case as in `native'.
elseif( c STREQUAL "engine" )
- # TODO: as we assume we are on X86, this is `jit'.
- list(APPEND expanded_components "LLVMJIT")
+ # already processed
elseif( c STREQUAL "all" )
list(APPEND expanded_components ${llvm_libs})
else( NOT idx LESS 0 )