Skip to content

Commit ec2be4d

Browse files
author
Oscar Fuentes
committed
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
1 parent f4352fe commit ec2be4d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

cmake/modules/LLVMConfig.cmake

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ function(explicit_map_components_to_libraries out_libs)
6161
set( link_components ${ARGN} )
6262
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
6363
string(TOUPPER "${llvm_libs}" capitalized_libs)
64+
65+
# Expand some keywords:
66+
list(FIND link_components "engine" engine_required)
67+
if( engine_required )
68+
# TODO: as we assume we are on X86, this is `jit'.
69+
list(APPEND link_components "jit")
70+
list(APPEND link_components "native")
71+
endif()
72+
list(FIND link_components "native" native_required)
73+
if( native_required )
74+
list(APPEND link_components "X86")
75+
endif()
76+
6477
# Translate symbolic component names to real libraries:
6578
foreach(c ${link_components})
6679
# add codegen, asmprinter, asmparser, disassembler
@@ -94,14 +107,13 @@ function(explicit_map_components_to_libraries out_libs)
94107
list(APPEND expanded_components "LLVM${c}Disassembler")
95108
endif()
96109
elseif( c STREQUAL "native" )
97-
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
110+
# already processed
98111
elseif( c STREQUAL "nativecodegen" )
99112
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
100113
elseif( c STREQUAL "backend" )
101114
# same case as in `native'.
102115
elseif( c STREQUAL "engine" )
103-
# TODO: as we assume we are on X86, this is `jit'.
104-
list(APPEND expanded_components "LLVMJIT")
116+
# already processed
105117
elseif( c STREQUAL "all" )
106118
list(APPEND expanded_components ${llvm_libs})
107119
else( NOT idx LESS 0 )

0 commit comments

Comments
 (0)