[Offload] Provide a CMake cache file to easily build offloading (#115074)
Summary:
This patch adds a cache file that will automatically enable openpm,
offload, and all the fancy GPU libraries.
GitOrigin-RevId: de41b137ddb68b5172f1ab042b0b0b495afbb490
diff --git a/docs/SupportAndFAQ.rst b/docs/SupportAndFAQ.rst
index dee707c..b645723 100644
--- a/docs/SupportAndFAQ.rst
+++ b/docs/SupportAndFAQ.rst
@@ -51,7 +51,23 @@
Q: How to build an OpenMP GPU offload capable compiler?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-To build an *effective* OpenMP offload capable compiler, only one extra CMake
+
+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 manually build an *effective* OpenMP offload capable compiler, only one extra CMake
option, ``LLVM_ENABLE_RUNTIMES="openmp;offload"``, is needed when building LLVM (Generic
information about building LLVM is available `here
<https://llvm.org/docs/GettingStarted.html>`__.). Make sure all backends that