[ASTMatchers] Fix build when no targets are enabled

This makes sense to do when building only tools like clang-tidy for
example.

Differential Revision: https://reviews.llvm.org/D93987
This commit is contained in:
Stephen Kelly 2020-12-26 21:11:21 +00:00
parent c3a21e5de3
commit c3403dc63d
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ function(is_llvm_target_library library return_var)
string(TOUPPER "${LLVM_TARGETS_TO_BUILD}" targets)
elseif(ARG_OMITTED_TARGETS)
set(omitted_targets ${LLVM_ALL_TARGETS})
list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
if (LLVM_TARGETS_TO_BUILD)
list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
endif()
string(TOUPPER "${omitted_targets}" targets)
else()
string(TOUPPER "${LLVM_ALL_TARGETS}" targets)