Lines Matching full:build
14 This document will present recipes to build the LLVM C library targeting a GPU
15 architecture. The GPU build uses the same :ref:`cross build<full_cross_build>`
24 describe how to build the GPU support specifically.
29 Standard runtimes build
32 The simplest way to build the GPU libc is to use the existing LLVM runtimes
34 compiler and using it to build the C library. The following CMake invocation
35 will instruct it to build the ``libc`` runtime targeting both AMD and NVIDIA
42 $> mkdir build
43 $> cd build
47 -DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
54 We need ``clang`` to build the GPU C library and ``lld`` to link AMDGPU
59 targets to build, in this case we want the default target and the GPU targets.
60 Note that if ``libc`` were included in ``LLVM_ENABLE_RUNTIMES`` it would build
62 your build towards the ``libc/cmake/caches/gpu.cmake`` cache file with ``-C``.
64 Runtimes cross build
67 For users wanting more direct control over the build process, the build steps
68 can be done manually instead. This build closely follows the instructions in the
70 build. We follow the same steps to first build the libc tools and a suitable
76 $> mkdir build-libc-tools # A different build directory for the build tools
77 $> cd build-libc-tools
87 $> ninja # Build the 'clang' compiler
89 Once this has finished the build directory should contain the ``clang``
90 compiler executable. We will use the ``clang`` compiler to build the GPU code.
91 We use these tools to bootstrap the build out of the runtimes directory
97 $> mkdir build # A different build directory for the build tools
98 $> cd build
102 $> cmake ../runtimes \ # Point to the runtimes build
112 The above steps will result in a build targeting one of the supported GPU
116 Standalone cross build
119 The GPU build can also be targeted directly as long as the compiler used is a
126 $> mkdir build # A different build directory for the build tools
127 $> cd build
128 $> CLANG_C_COMPILER=</path/to/clang> # Must be a trunk build
129 $> CLANG_CXX_COMPILER=</path/to/clang++> # Must be a trunk build
141 This will build and install the GPU C library along with all the other LLVM
144 Build overview
147 Once installed, the GPU build will create several files used for different
182 This will be included if the build system found the ``hsa-runtime64`` library
184 required to build the GPU tests .See the :ref:`libc GPU usage<libc_gpu_usage>`
189 This will be included if the build system found the CUDA driver API. This is
207 control the GPU build of the C library. These options can be passed individually
209 standard runtime build.
212 This flag controls whether or not the libc build will generate its own
220 Sets the architecture used to build the GPU tests for, such as ``gfx90a`` or