[Openmp-commits] [openmp] 5c189d3 - [OpenMP] Update FAQ for enabling cuda offloading

Asher Mancinelli via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 18 10:56:52 PDT 2021


Author: Asher Mancinelli
Date: 2021-06-18T11:55:45-06:00
New Revision: 5c189d30e60ac044b5bb473648c5505b4acdeb08

URL: https://github.com/llvm/llvm-project/commit/5c189d30e60ac044b5bb473648c5505b4acdeb08
DIFF: https://github.com/llvm/llvm-project/commit/5c189d30e60ac044b5bb473648c5505b4acdeb08.diff

LOG: [OpenMP] Update FAQ for enabling cuda offloading

Add an FAQ entry and add a few lines to an existing one. Document
the use of `GCC_INSTALL_PREFIX` for pointing clang to correct
GCC installation for two-stage build.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D104474

Added: 
    

Modified: 
    openmp/docs/SupportAndFAQ.rst

Removed: 
    


################################################################################
diff  --git a/openmp/docs/SupportAndFAQ.rst b/openmp/docs/SupportAndFAQ.rst
index a469b5e894cc9..2eb15d24aa1af 100644
--- a/openmp/docs/SupportAndFAQ.rst
+++ b/openmp/docs/SupportAndFAQ.rst
@@ -56,6 +56,8 @@ option, `LLVM_ENABLE_RUNTIMES="openmp"`, is needed when building LLVM (Generic
 information about building LLVM is available `here <https://llvm.org/docs/GettingStarted.html>`__.).
 Make sure all backends that are targeted by OpenMP to be enabled. By default,
 Clang will be built with all backends enabled.
+When building with `LLVM_ENABLE_RUNTIMES="openmp"` OpenMP should not be enabled
+in `LLVM_ENABLE_PROJECTS` because it is enabled by default.
 
 For Nvidia offload, please see :ref:`_build_nvidia_offload_capable_compiler`.
 For AMDGPU offload, please see :ref:`_build_amdgpu_offload_capable_compiler`.
@@ -206,3 +208,15 @@ Q: Can I use dynamically linked libraries with OpenMP offloading
 Dynamically linked libraries can be only used if there is no device code split
 between the library and application. Anything declared on the device inside the
 shared library will not be visible to the application when it's linked.
+
+Q: How to build an OpenMP offload capable compiler with an outdated host compiler?
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Enabling the OpenMP runtime will perform a two-stage build for you.
+If your host compiler is 
diff erent from your system-wide compiler, you may need
+to set the CMake variable `GCC_INSTALL_PREFIX` so clang will be able to find the
+correct GCC toolchain in the second stage of the build.
+
+For example, if your system-wide GCC installation is too old to build LLVM and
+you would like to use a newer GCC, set the CMake variable `GCC_INSTALL_PREFIX`
+to inform clang of the GCC installation you would like to use in the second stage.


        


More information about the Openmp-commits mailing list