[PATCH] D112062: [llvm][cmake] Improve error message about unknown build targets
Timm Bäder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 19 03:47:44 PDT 2021
tbaeder created this revision.
Herald added a subscriber: mgorny.
tbaeder requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
If a build target was previously not in `LLVM_ALL_TARGETS`, but also not
in `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD`, cmake would still tell people to
pass it via `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112062
Files:
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -738,9 +738,12 @@
# LLVM_TARGETS_TO_BUILD and LLVM_EXPERIMENTAL_TARGETS_TO_BUILD, so
# this test just makes sure that any experimental targets were passed via
# LLVM_EXPERIMENTAL_TARGETS_TO_BUILD, not LLVM_TARGETS_TO_BUILD.
- if( idx LESS 0 AND idy LESS 0 )
+ if( idx LESS 0 AND idy GREATER_EQUAL 0 )
message(FATAL_ERROR "The target `${t}' is experimental and must be passed "
"via LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.")
+ elseif( idx LESS 0 AND idy LESS 0 )
+ message(FATAL_ERROR "The target `${t}' is neither a supported target nor "
+ "an experimental target")
else()
set(LLVM_ENUM_TARGETS "${LLVM_ENUM_TARGETS}LLVM_TARGET(${t})\n")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112062.380635.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211019/d68f0a68/attachment.bin>
More information about the llvm-commits
mailing list