diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-23 17:42:13 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-23 17:42:13 +0000 |
commit | db3480c432bff2be4ab26630343545ba66f00dac (patch) | |
tree | f4b5ba7eaefa78a99c023f35a60ee6b607d74463 /cmake/modules | |
parent | d662576671cba43988ff2753e1d006e50c568241 (diff) | |
download | llvm-db3480c432bff2be4ab26630343545ba66f00dac.tar.gz llvm-db3480c432bff2be4ab26630343545ba66f00dac.tar.bz2 llvm-db3480c432bff2be4ab26630343545ba66f00dac.tar.xz |
Supports building with a list of targets that does not contain
X86. Fixes PR9533.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-rwxr-xr-x | cmake/modules/LLVMConfig.cmake | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index ec7831da3b..fd1cfa8690 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -64,15 +64,22 @@ function(explicit_map_components_to_libraries out_libs) string(TOUPPER "${llvm_libs}" capitalized_libs) # Expand some keywords: + list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" have_native_backend) list(FIND link_components "engine" engine_required) - if( NOT engine_required STREQUAL "-1" ) - # TODO: as we assume we are on X86, this is `jit'. - list(APPEND link_components "jit") - list(APPEND link_components "native") + if( NOT engine_required EQUAL -1 ) + list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit) + if( NOT have_native_backend EQUAL -1 AND NOT have_jit EQUAL -1 ) + list(APPEND link_components "jit") + list(APPEND link_components "native") + else() + list(APPEND link_components "interpreter") + endif() endif() list(FIND link_components "native" native_required) - if( NOT native_required STREQUAL "-1" ) - list(APPEND link_components "X86") + if( NOT native_required EQUAL -1 ) + if( NOT have_native_backend EQUAL -1 ) + list(APPEND link_components ${LLVM_NATIVE_ARCH}) + endif() endif() # Translate symbolic component names to real libraries: |