Currently @executable_path/../lib is used as the rpath for mac builds.
When using LLVM_LINK_LLVM_DYLIB, libLTO.dylib is linked against libLLVM.dylib,
just like all the executables. However libLTO fails to load because in this
case the executable is ld (instead of one of the LLVM tools) which is in a
different location. Adding @loader_path to the rpath list fixes this
problem.
Details
Details
- Reviewers
beanz
Diff Detail
Diff Detail
- Build Status
Buildable 268 Build 268: arc lint + arc unit
Event Timeline
Comment Actions
So this seems to work but I'm not sure if it's the best solution; I'm hoping an OSX and/or CMake expert can help. Should I make it conditional on -DLLVM_LINK_LLVM_DYLIB? Can/should it be done just for libLTO and not for the executable tools? Something else?
Comment Actions
There is actually a refactoring of this code being reviewed at the moment, which should address this issue. See D25304.