Lines Matching +full:docs +full:- +full:openmp +full:- +full:html
17 it *must* be built with an up-to-date ``clang`` compiler. This is because the
21 ``nvptx64-nvidia-cuda`` for NVIDIA GPUs or ``amdgcn-amd-amdhsa`` for AMD GPUs.
22 Targeting these architectures is done through ``clang``'s cross-compiling
23 support using the ``--target=<triple>`` flag. The following sections will
30 -----------------------
33 support. This will automatically handle bootstrapping an up-to-date ``clang``
39 .. code-block:: sh
41 $> cd llvm-project # The llvm-project checkout
44 $> cmake ../llvm -G Ninja \
45 -DLLVM_ENABLE_PROJECTS="clang;lld" \
46 -DLLVM_ENABLE_RUNTIMES="openmp" \
47 -DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
48 -DCMAKE_INSTALL_PREFIX=<PATH> \ # Where the libraries will live
49 -DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=libc \
50 -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=libc \
51 -DLLVM_RUNTIME_TARGETS="default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda"
55 executables, so we enable them in ``LLVM_ENABLE_PROJECTS``. We add ``openmp`` to
57 OpenMP support. We then set ``RUNTIMES_<triple>_LLVM_ENABLE_RUNTIMES`` to enable
62 your build towards the ``libc/cmake/caches/gpu.cmake`` cache file with ``-C``.
65 --------------------
71 compiler. These tools must all be up-to-date with the libc source.
73 .. code-block:: sh
75 $> cd llvm-project # The llvm-project checkout
76 $> mkdir build-libc-tools # A different build directory for the build tools
77 $> cd build-libc-tools
81 -G Ninja \
82 -DLLVM_ENABLE_PROJECTS="clang" \
83 -DCMAKE_C_COMPILER=$HOST_C_COMPILER \
84 -DCMAKE_CXX_COMPILER=$HOST_CXX_COMPILER \
85 -DLLVM_LIBC_FULL_BUILD=ON \
86 -DCMAKE_BUILD_TYPE=Release # Release suggested to make "clang" fast
94 .. code-block:: sh
96 $> cd llvm-project # The llvm-project checkout
99 $> TARGET_TRIPLE=<amdgcn-amd-amdhsa or nvptx64-nvidia-cuda>
103 -G Ninja \
104 -DLLVM_ENABLE_RUNTIMES=libc \
105 -DCMAKE_C_COMPILER=$TARGET_C_COMPILER \
106 -DCMAKE_CXX_COMPILER=$TARGET_CXX_COMPILER \
107 -DLLVM_LIBC_FULL_BUILD=ON \
108 -DLLVM_RUNTIMES_TARGET=$TARGET_TRIPLE \
109 -DCMAKE_BUILD_TYPE=Release
117 ----------------------
123 .. code-block:: sh
125 $> cd llvm-project # The llvm-project checkout
130 $> TARGET_TRIPLE=<amdgcn-amd-amdhsa or nvptx64-nvidia-cuda>
132 -G Ninja \
133 -DLLVM_ENABLE_PROJECTS=libc \
134 -DCMAKE_C_COMPILER=$CLANG_C_COMPILER \
135 -DCMAKE_CXX_COMPILER=$CLANG_CXX_COMPILER \
136 -DLLVM_LIBC_FULL_BUILD=ON \
137 -DLIBC_TARGET_TRIPLE=$TARGET_TRIPLE \
138 -DCMAKE_BUILD_TYPE=Release
150 **include/<target-triple>**
154 **lib/clang/<llvm-major-version>/include/llvm-libc-wrappers/llvm-libc-decls**
156 OpenMP. They contain functions supported in the GPU libc along with attributes
160 **lib/<target-triple>/libc.a**
161 The main C library static archive containing LLVM-IR targeting the given GPU.
164 **lib/<target-triple>/libm.a**
168 **lib/<target-triple>/libc.bc**
169 An alternate form of the library provided as a single LLVM-IR bitcode blob.
172 **lib/<target-triple>/libm.bc**
173 An alternate form of the library provided as a single LLVM-IR bitcode blob
176 **lib/<target-triple>/crt1.o**
177 An LLVM-IR file containing startup code to call the ``main`` function on the
180 **bin/amdhsa-loader**
182 This will be included if the build system found the ``hsa-runtime64`` library
187 **bin/nvptx-loader**
192 **include/llvm-libc-rpc-server.h**
208 to each target using ``-DRUNTIMES_<target>_<variable>=<value>`` when using a