[Openmp-commits] [PATCH] D147943: [OpenMP][Docs] Add documentation for using configuration files

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 14 07:39:17 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0979ea9235ee: [OpenMP][Docs] Add documentation for using configuration files (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147943

Files:
  openmp/docs/SupportAndFAQ.rst


Index: openmp/docs/SupportAndFAQ.rst
===================================================================
--- openmp/docs/SupportAndFAQ.rst
+++ openmp/docs/SupportAndFAQ.rst
@@ -168,11 +168,18 @@
 are found like any other dynamic library, by setting rpath or runpath on the
 executable, by setting ``LD_LIBRARY_PATH``, or by adding them to the system search.
 
-``libomptarget.so`` has rpath or runpath (whichever the system default is) set to
-``$ORIGIN``, and the plugins are located next to it, so it will find the plugins
-without any environment variables set. If ``LD_LIBRARY_PATH`` is set, whether it
-overrides which plugin is found depends on whether your system treats ``-Wl,-rpath``
-as RPATH or RUNPATH.
+``libomptarget.so`` is only supported to work with the associated ``clang`` 
+compiler. On systems with globally installed ``libomptarget.so`` this can be 
+problematic. For this reason it is recommended to use a `Clang configuration 
+file <https://clang.llvm.org/docs/UsersManual.html#configuration-files>`__ to 
+automatically configure the environment. For example, store the following file 
+as ``openmp.cfg`` next to your ``clang`` executable.
+
+.. code-block:: text
+
+  # Library paths for OpenMP offloading.
+  -L '<CFGDIR>/../lib'
+  -Wl,-rpath='<CFGDIR>/../lib'
 
 The plugins will try to find their dependencies in plugin-dependent fashion.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147943.513592.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230414/e032d506/attachment.bin>


More information about the Openmp-commits mailing list