[libc-commits] [libc] fad1470 - [libc] Add note to use `LIBC_GPU_BUILD=ON` as another form
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Apr 10 12:08:06 PDT 2024
Author: Joseph Huber
Date: 2024-04-10T14:07:57-05:00
New Revision: fad14707b73d6387e6276507e1c5726e67f08cd6
URL: https://github.com/llvm/llvm-project/commit/fad14707b73d6387e6276507e1c5726e67f08cd6
DIFF: https://github.com/llvm/llvm-project/commit/fad14707b73d6387e6276507e1c5726e67f08cd6.diff
LOG: [libc] Add note to use `LIBC_GPU_BUILD=ON` as another form
Summary:
This is a shorthand to enable GPU support so it should be listed in the
docs.
Added:
Modified:
libc/docs/gpu/building.rst
Removed:
################################################################################
diff --git a/libc/docs/gpu/building.rst b/libc/docs/gpu/building.rst
index 6d94134a407d34..d3e64c6d42431c 100644
--- a/libc/docs/gpu/building.rst
+++ b/libc/docs/gpu/building.rst
@@ -33,7 +33,8 @@ The simplest way to build the GPU libc is to use the existing LLVM runtimes
support. This will automatically handle bootstrapping an up-to-date ``clang``
compiler and using it to build the C library. The following CMake invocation
will instruct it to build the ``libc`` runtime targeting both AMD and NVIDIA
-GPUs.
+GPUs. The ``LIBC_GPU_BUILD`` option can also be enabled to add the relevant
+arguments automatically.
.. code-block:: sh
@@ -234,6 +235,10 @@ standard runtime build.
This flag controls whether or not the libc build will generate its own
headers. This must always be on when targeting the GPU.
+**LIBC_GPU_BUILD**:BOOL
+ Shorthand for enabling GPU support. Equivalent to enabling support for both
+ AMDGPU and NVPTX builds for ``libc``.
+
**LIBC_GPU_TEST_ARCHITECTURE**:STRING
Sets the architecture used to build the GPU tests for, such as ``gfx90a`` or
``sm_80`` for AMD and NVIDIA GPUs respectively. The default behavior is to
More information about the libc-commits
mailing list