mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
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
This commit is contained in:
@@ -61,6 +61,19 @@ function(explicit_map_components_to_libraries out_libs)
|
|||||||
set( link_components ${ARGN} )
|
set( link_components ${ARGN} )
|
||||||
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
|
get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
|
||||||
string(TOUPPER "${llvm_libs}" capitalized_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:
|
# Translate symbolic component names to real libraries:
|
||||||
foreach(c ${link_components})
|
foreach(c ${link_components})
|
||||||
# add codegen, asmprinter, asmparser, disassembler
|
# add codegen, asmprinter, asmparser, disassembler
|
||||||
@@ -94,14 +107,13 @@ function(explicit_map_components_to_libraries out_libs)
|
|||||||
list(APPEND expanded_components "LLVM${c}Disassembler")
|
list(APPEND expanded_components "LLVM${c}Disassembler")
|
||||||
endif()
|
endif()
|
||||||
elseif( c STREQUAL "native" )
|
elseif( c STREQUAL "native" )
|
||||||
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
|
# already processed
|
||||||
elseif( c STREQUAL "nativecodegen" )
|
elseif( c STREQUAL "nativecodegen" )
|
||||||
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
|
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
|
||||||
elseif( c STREQUAL "backend" )
|
elseif( c STREQUAL "backend" )
|
||||||
# same case as in `native'.
|
# same case as in `native'.
|
||||||
elseif( c STREQUAL "engine" )
|
elseif( c STREQUAL "engine" )
|
||||||
# TODO: as we assume we are on X86, this is `jit'.
|
# already processed
|
||||||
list(APPEND expanded_components "LLVMJIT")
|
|
||||||
elseif( c STREQUAL "all" )
|
elseif( c STREQUAL "all" )
|
||||||
list(APPEND expanded_components ${llvm_libs})
|
list(APPEND expanded_components ${llvm_libs})
|
||||||
else( NOT idx LESS 0 )
|
else( NOT idx LESS 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user