[PATCH] D96014: Add 'LLVM_DEFAULT_TARGET_TRIPLE' to the documented list of CMake variables

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 04:23:59 PST 2021


dylanmckay created this revision.
dylanmckay added reviewers: echristo, vsk.
Herald added a subscriber: mgorny.
dylanmckay requested review of this revision.
Herald added a project: LLVM.

I always forget this variable, and the distinction between
'LLVM_TARGET_ARCH', and this variable is only documented on the 'cross
compiling' page, which I never spot and always end up searching through
the codebase for.

This patch adds the variable to the Sphinx CMake documentation so that
it is easily findable in the official LLVM docs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96014

Files:
  llvm/docs/CMake.rst


Index: llvm/docs/CMake.rst
===================================================================
--- llvm/docs/CMake.rst
+++ llvm/docs/CMake.rst
@@ -346,6 +346,12 @@
   of the machine where LLVM is being built. If you are cross-compiling, set it
   to the target architecture name.
 
+**LLVM_DEFAULT_TARGET_TRIPLE**:STRING
+  LLVM target to use for code generation when no target is explicitly specified.
+  It defaults to "host", meaning that it shall pick the architecture
+  of the machine where LLVM is being built. If you are cross-compiling, set it
+  to the target triple of your desired architecture.
+
 **LLVM_TABLEGEN**:STRING
   Full path to a native TableGen executable (usually named ``llvm-tblgen``). This is
   intended for cross-compiling: if the user sets this variable, no native


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96014.321380.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210204/310e7d15/attachment.bin>


More information about the llvm-commits mailing list