[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:51:09 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 1/3] [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
>From 4fb7d224cea3eff7d5c4dc2159441b19e23b5f81 Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Mon, 7 Oct 2024 14:31:18 +0000
Subject: [PATCH 2/3] [DOCS] Update for comments.
---
llvm/docs/CMake.rst | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 0233f8ffe71b8c..7aa95b27694663 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -832,15 +832,14 @@ 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;host"``.
+ ``-DLLVM_TARGETS_TO_BUILD="X86;PowerPC"``.
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;host;Native``
+ ``AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore``
- **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.
+ You can also specify ``host`` or ``Native`` to automatically detect and include
+ the target corresponding to the host machine's architecture. For example, on an
+ x86_64 machine, specifying ``-DLLVM_TARGETS_TO_BUILD=host`` will include the
+ ``X86`` target.
**LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN**:BOOL
If enabled, the compiler version check will only warn when using a toolchain
>From 52519ba10652f20a538f6cf307be93f03aec0f30 Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Mon, 7 Oct 2024 14:50:39 +0000
Subject: [PATCH 3/3] [DOCS] Add 'all' target comments.
---
llvm/docs/CMake.rst | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 7aa95b27694663..5a3c33f90c711d 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -836,10 +836,11 @@ enabled sub-projects. Nearly all of these variable names begin with
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``
- You can also specify ``host`` or ``Native`` to automatically detect and include
- the target corresponding to the host machine's architecture. For example, on an
- x86_64 machine, specifying ``-DLLVM_TARGETS_TO_BUILD=host`` will include the
- ``X86`` target.
+ You can also specify ``host`` or ``Native`` to automatically detect and
+ include the target corresponding to the host machine's architecture, or
+ use ``all`` to include all available targets.
+ For example, on an x86_64 machine, specifying ``-DLLVM_TARGETS_TO_BUILD=host``
+ will include the ``X86`` target.
**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