[all-commits] [llvm/llvm-project] 9b9d08: Set rpath on openmp executables

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Mon Jan 31 08:35:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b9d08111b618d74574ba03e5cc3d752ecc56f55
      https://github.com/llvm/llvm-project/commit/9b9d08111b618d74574ba03e5cc3d752ecc56f55
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    A clang/test/OpenMP/Inputs/libomp.a
    A clang/test/OpenMP/implicit_rpath.c
    M openmp/libomptarget/test/lit.cfg

  Log Message:
  -----------
  Set rpath on openmp executables

Openmp executables need to find libomp and libomptarget at runtime.
This currently requires LD_LIBRARY_PATH or the user to specify rpath. Change
that to set the expected location of the openmp libraries in the install tree.

Whether rpath means rpath or runpath is system dependent. The attached test
shows that the Wl,--disable-new-dtags control interacts correctly with this feature.

The implicit rpath field is appended to any user specified ones which is ideal.

Reviewed By: jhuber6

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




More information about the All-commits mailing list