Skip to content

Commit fad1470

Browse files
committed
[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.
1 parent f81879c commit fad1470

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libc/docs/gpu/building.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ The simplest way to build the GPU libc is to use the existing LLVM runtimes
3333
support. This will automatically handle bootstrapping an up-to-date ``clang``
3434
compiler and using it to build the C library. The following CMake invocation
3535
will instruct it to build the ``libc`` runtime targeting both AMD and NVIDIA
36-
GPUs.
36+
GPUs. The ``LIBC_GPU_BUILD`` option can also be enabled to add the relevant
37+
arguments automatically.
3738

3839
.. code-block:: sh
3940
@@ -234,6 +235,10 @@ standard runtime build.
234235
This flag controls whether or not the libc build will generate its own
235236
headers. This must always be on when targeting the GPU.
236237

238+
**LIBC_GPU_BUILD**:BOOL
239+
Shorthand for enabling GPU support. Equivalent to enabling support for both
240+
AMDGPU and NVPTX builds for ``libc``.
241+
237242
**LIBC_GPU_TEST_ARCHITECTURE**:STRING
238243
Sets the architecture used to build the GPU tests for, such as ``gfx90a`` or
239244
``sm_80`` for AMD and NVIDIA GPUs respectively. The default behavior is to

0 commit comments

Comments
 (0)