[PATCH] D93177: [CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 07:08:33 PST 2021


sbc100 added a comment.

This change broke the emscripten SDK builders which build with `LLVM_LINK_LLVM_DYLIB` and expect the resulting binaries to be portable/relocatable.

Before (portable):

  readelf -d ../llvm-build/bin/llc | grep runpath
   0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib]

After (non-portable):

  readelf -d ../llvm-build/bin/llc | grep runpath
   0x000000000000001d (RUNPATH)            Library runpath: [/usr/local/google/home/sbc/dev/wasm/llvm-build/lib]

It looks like this was probably intentional and we probably just need to set some new cmake option?   We don't set `CMAKE_BUILD_RPATH` but we do use `LLVM_LINK_LLVM_DYLIB` and `LLVM_BUILD_LLVM_DYLIB`: https://github.com/WebAssembly/waterfall/blob/2291ee46c5a5d04cf1269747d6193e530217e02c/src/build.py#L887

I haven't really dug into the details but I tried setting `-DCMAKE_SKIP_INSTALL_RPATH=ON` and `-DCMAKE_SKIP_INSTALL_RPATH=OFF` to no avail.    What should I be going if I want the old/portable behaviour of `$ORIGIN/../lib`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93177



More information about the llvm-commits mailing list