diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-10 09:50:40 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-14 09:39:05 -0500 |
commit | 0979ea9235ee26cfcd8a0c13839380af30f13047 (patch) | |
tree | 5ddc1c9accd16d766c2e5dcc0e84d8678b7abfcf /openmp/docs | |
parent | 08c472f254df4959b33dd65c6cd208bbd890bbbc (diff) | |
download | llvm-0979ea9235ee26cfcd8a0c13839380af30f13047.tar.gz |
[OpenMP][Docs] Add documentation for using configuration files
We recently reverted a patch that automatically set the rpath on OpenMP
executables. This was used because the `libomptarget.so` library is only
expected to work with the same version of compiler that will be using
it. This patch adds some documentation for how to get similar behaviour
as before using a clang configuration file.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D147943
Diffstat (limited to 'openmp/docs')
-rw-r--r-- | openmp/docs/SupportAndFAQ.rst | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/openmp/docs/SupportAndFAQ.rst b/openmp/docs/SupportAndFAQ.rst index 4ccc2ae2963f..249eb18b82a2 100644 --- a/openmp/docs/SupportAndFAQ.rst +++ b/openmp/docs/SupportAndFAQ.rst @@ -168,11 +168,18 @@ The compiled executable is dynamically linked against a host runtime, e.g. 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. |