[PATCH] D129799: [clang-tidy] Add CLANG_MAKE_CONFUSABLE_TABLE cmake cache variable to avoid building when cross compiling
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 14 13:26:52 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: serge-sans-paille, sammccall, whisperity, aaron.ballman.
Herald added subscribers: carlosgalvezp, rnkovacs, xazax.hun, mgorny.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: clang-tools-extra.
This is similar to the LLVM_TABLEGEN, CLANG_TABLEGEN and
CLANG_PSEUDO_GEN variables.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129799
Files:
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
Index: clang-tools-extra/clang-tidy/misc/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-tidy/misc/CMakeLists.txt
+++ clang-tools-extra/clang-tidy/misc/CMakeLists.txt
@@ -3,7 +3,13 @@
Support
)
-if(LLVM_USE_HOST_TOOLS)
+set(CLANG_MAKE_CONFUSABLE_TABLE "clang-make-confusable-table" CACHE
+ STRING "Host clang-make-confusable-table executable. Saves building if cross-compiling.")
+
+if(NOT CLANG_MAKE_CONFUSABLE_TABLE STREQUAL "clang-make-confusable-table")
+ set(make_confusable_table ${CLANG_MAKE_CONFUSABLE_TABLE})
+ set(make_confusable_table_target ${CLANG_MAKE_CONFUSABLE_TABLE})
+elseif(LLVM_USE_HOST_TOOLS)
build_native_tool(clang-make-confusable-table make_confusable_table)
set(make_confusable_table_target "${make_confusable_table}")
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129799.444780.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220714/99c14843/attachment.bin>
More information about the cfe-commits
mailing list