[PATCH] D118493: [WIP]Set rpath on openmp executables

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 28 15:36:14 PST 2022


JonChesterfield added a comment.

Slightly stalled on testing - I'd like to emit the object and feed it to readelf, something like:
`// RUN: %clang %s -o %t && llvm-readelf --dynamic-table %t | FileCheck %s --check-prefixes=CHECK`

which errors with cannot find -lomp. I feel there should be a linker flag to the effect of "ignore libraries you can't find", which I have failed to identify. Candidate workarounds are putting empty files called libomp.a in Inputs, changing the control flow in addOpenMPRuntime or finding said linker flag.

Toolchain style testing (like Driver/amdgpu-openmp-toolchain) is sufficient to show rpath is inserted, e.g. `"-lomp" "-lomptarget" "-rpath" "*/llvm/lib"`, but doesn't let one check interaction with user provided rpaths. I'll pick this up over the weekend.

Poking it manually works as one would wish so the functionality looks fine. Please speak up in the meantime if you'd like the option to be named or documented differently, or if there's any other change desired for the non-testing part.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118493



More information about the cfe-commits mailing list