[all-commits] [llvm/llvm-project] b24e9f: [amdgpu-arch] Fix rpath to run from build dir

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Thu May 6 05:07:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b24e9f82b71f325214c41fdc3f106207cc2244a6
      https://github.com/llvm/llvm-project/commit/b24e9f82b71f325214c41fdc3f106207cc2244a6
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M clang/tools/amdgpu-arch/CMakeLists.txt

  Log Message:
  -----------
  [amdgpu-arch] Fix rpath to run from build dir

[amdgpu-arch] Fix rpath to run from build dir

Prior to this, amdgpu-arch has RUNPATH set to $ORIGIN/../lib which works
for some installs, but not from the build directory where clang executes
the tool from when running tests.

This cmake option adds the location of the rocr runtime to the RUNPATH
(note, it amends RUNPATH here, despite the cmake option referring to RPATH)
to create a binary that runs from build or install location.

Before:
RUNPATH [$ORIGIN/../lib]
After:
RUNPATH [$ORIGIN/../lib:$HOME/llvm-install/lib]

Credit to Greg for knowing this trick and pointing to examples of it in use
for the aomp build scripts.

Reviewed By: pdhaliwal

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




More information about the All-commits mailing list