From 4933c717ecbebb235b99f9e7ab6e49c6e18af5b8 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 19 Jul 2019 20:58:11 +0000 Subject: [PATCH] Fix a latent bug discovered by r366610: nativecodegen includes X86CodeGen when X86 is not compiled I believe this to have been a latent bug as the same expansion checks for the existence of ${native_tgt}Info and ${native_tgt}Desc and only adds them if they were compiled but unconditionally adds ${native_tgt}CodeGen. This should fix llvm-clang-x86_64-win-fast which builds ARM only on an X86 host and similar builders. llvm-svn: 366612 --- llvm/cmake/modules/LLVM-Config.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake index f29dacb..614f55d 100644 --- a/llvm/cmake/modules/LLVM-Config.cmake +++ b/llvm/cmake/modules/LLVM-Config.cmake @@ -154,7 +154,9 @@ function(llvm_expand_pseudo_components out_components) list(APPEND expanded_components "${c}Utils") endif() elseif( c STREQUAL "nativecodegen" ) - list(APPEND expanded_components "${LLVM_NATIVE_ARCH}CodeGen") + if( TARGET LLVM${LLVM_NATIVE_ARCH}CodeGen ) + list(APPEND expanded_components "${LLVM_NATIVE_ARCH}CodeGen") + endif() if( TARGET LLVM${LLVM_NATIVE_ARCH}Desc ) list(APPEND expanded_components "${LLVM_NATIVE_ARCH}Desc") endif() -- 2.7.4