[PATCH] D93987: [ASTMatchers] Fix build when no targets are enabled
Stephen Kelly via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 3 05:52:29 PST 2021
steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: mgorny.
steveire requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This makes sense to do when building only tools like clang-tidy for
example.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93987
Files:
llvm/cmake/modules/LLVM-Config.cmake
Index: llvm/cmake/modules/LLVM-Config.cmake
===================================================================
--- llvm/cmake/modules/LLVM-Config.cmake
+++ llvm/cmake/modules/LLVM-Config.cmake
@@ -28,7 +28,9 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93987.314279.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210103/46299ca1/attachment.bin>
More information about the llvm-commits
mailing list