[PATCH] D93987: [ASTMatchers] Fix build when no targets are enabled

Stephen Kelly via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 06:43:54 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc3403dc63d73: [ASTMatchers] Fix build when no targets are enabled (authored by stephenkelly).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93987/new/

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.314592.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210105/c42277ec/attachment.bin>


More information about the llvm-commits mailing list