llvm.org GIT mirror llvm / ec2be4d
CMake: fix handling of engine' link components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_29@127361 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 8 years ago
1 changed file(s) with 15 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
6060 set( link_components ${ARGN} )
6161 get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
6262 string(TOUPPER "${llvm_libs}" capitalized_libs)
63
64 # Expand some keywords:
65 list(FIND link_components "engine" engine_required)
66 if( engine_required )
67 # TODO: as we assume we are on X86, this is `jit'.
68 list(APPEND link_components "jit")
69 list(APPEND link_components "native")
70 endif()
71 list(FIND link_components "native" native_required)
72 if( native_required )
73 list(APPEND link_components "X86")
74 endif()
75
6376 # Translate symbolic component names to real libraries:
6477 foreach(c ${link_components})
6578 # add codegen, asmprinter, asmparser, disassembler
93106 list(APPEND expanded_components "LLVM${c}Disassembler")
94107 endif()
95108 elseif( c STREQUAL "native" )
96 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
109 # already processed
97110 elseif( c STREQUAL "nativecodegen" )
98111 list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
99112 elseif( c STREQUAL "backend" )
100113 # same case as in `native'.
101114 elseif( c STREQUAL "engine" )
102 # TODO: as we assume we are on X86, this is `jit'.
103 list(APPEND expanded_components "LLVMJIT")
115 # already processed
104116 elseif( c STREQUAL "all" )
105117 list(APPEND expanded_components ${llvm_libs})
106118 else( NOT idx LESS 0 )