[llvm] [LLVM][DOCS] Add documentation for 'host' and 'Native' options in LLVM_TARGETS_TO_BUILD. (PR #111382)

Harrison Hao via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 07:15:02 PDT 2024


https://github.com/harrisonGPU updated https://github.com/llvm/llvm-project/pull/111382

>From 90e97b684310f440ea8c3670959972f1d5ba4a3e Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Mon, 7 Oct 2024 14:04:35 +0000
Subject: [PATCH] [LLVM][DOCS] Add documentation for 'host' and 'Native'
 options in LLVM_TARGETS_TO_BUILD.

---
 llvm/docs/CMake.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 321bae48594cf9..0233f8ffe71b8c 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -832,9 +832,15 @@ enabled sub-projects. Nearly all of these variable names begin with
 **LLVM_TARGETS_TO_BUILD**:STRING
   Semicolon-separated list of targets to build, or *all* for building all
   targets. Case-sensitive. Defaults to *all*. Example:
-  ``-DLLVM_TARGETS_TO_BUILD="X86;PowerPC"``.
+  ``-DLLVM_TARGETS_TO_BUILD="X86;PowerPC;host"``.
   The full list, as of March 2023, is:
-  ``AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore``
+  ``AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore;host;Native``
+
+  **Additional Options**:
+  - **host**: Automatically detect and build the target corresponding to the host machine's architecture.
+  
+    For example, on an x86_64 machine, `host` will map to `X86`.
+  - **Native**: Alias for `host`, used interchangeably to specify the host architecture.
 
 **LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN**:BOOL
   If enabled, the compiler version check will only warn when using a toolchain



More information about the llvm-commits mailing list