[Openmp-commits] [llvm] [openmp] [Offload] Provide a CMake cache file to easily build offloading (PR #115074)
Shilei Tian via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 6 12:45:51 PST 2024
================
@@ -51,6 +51,22 @@ All patches go through the regular `LLVM review process
Q: How to build an OpenMP GPU offload capable compiler?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The easiest way to create an offload capable compiler is to use the provided
+CMake cache file. This will enable the projects and runtimes necessary for
+offloading as well as some extra options.
+
+.. code-block:: sh
+
+ $> cd llvm-project # The llvm-project checkout
+ $> mkdir build
+ $> cd build
+ $> cmake ../llvm -G Ninja \
+ -C ../offload/cmake/caches/Offload.cmake \ # The preset cache file
+ -DCMAKE_BUILD_TYPE=<Debug|Release> \ # Select build type
+ -DCMAKE_INSTALL_PREFIX=<PATH> \ # Where the libraries will live
+ $> ninja install
+
To build an *effective* OpenMP offload capable compiler, only one extra CMake
----------------
shiltian wrote:
This needs to be refined in a way that, as a manual alternative, ...
https://github.com/llvm/llvm-project/pull/115074
More information about the Openmp-commits
mailing list