@@ -61,6 +61,19 @@ function(explicit_map_components_to_libraries out_libs)
61
61
set ( link_components ${ARGN} )
62
62
get_property (llvm_libs GLOBAL PROPERTY LLVM_LIBS)
63
63
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
+
64
77
# Translate symbolic component names to real libraries:
65
78
foreach (c ${link_components} )
66
79
# add codegen, asmprinter, asmparser, disassembler
@@ -94,14 +107,13 @@ function(explicit_map_components_to_libraries out_libs)
94
107
list (APPEND expanded_components "LLVM${c} Disassembler" )
95
108
endif ()
96
109
elseif ( c STREQUAL "native" )
97
- list ( APPEND expanded_components "LLVM ${LLVM_NATIVE_ARCH} CodeGen" )
110
+ # already processed
98
111
elseif ( c STREQUAL "nativecodegen" )
99
112
list (APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH} CodeGen" )
100
113
elseif ( c STREQUAL "backend" )
101
114
# same case as in `native'.
102
115
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
105
117
elseif ( c STREQUAL "all" )
106
118
list (APPEND expanded_components ${llvm_libs} )
107
119
else ( NOT idx LESS 0 )
0 commit comments