[Openmp-commits] [PATCH] D104474: [OpenMP] Update FAQ with additional instructions for enabling cuda offloading

Asher Mancinelli via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 17 15:58:11 PDT 2021


ashermancinelli updated this revision to Diff 352867.
ashermancinelli added a comment.

Document use of CMake variable GCC_INSTALL_PREFIX over ugly workaround.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104474/new/

https://reviews.llvm.org/D104474

Files:
  openmp/docs/SupportAndFAQ.rst


Index: openmp/docs/SupportAndFAQ.rst
===================================================================
--- openmp/docs/SupportAndFAQ.rst
+++ openmp/docs/SupportAndFAQ.rst
@@ -56,6 +56,8 @@
 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 @@
 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 different from your system-wide compiler, you may need
+to set some environment variables such that 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104474.352867.patch
Type: text/x-patch
Size: 1678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210617/7e224807/attachment.bin>


More information about the Openmp-commits mailing list