building dynamic libraries on mac sets id/name for linker to something questionable #121674
Labels
A-linkage
Area: linking into static, shared libraries and binaries
O-macos
Operating system: macOS
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If I build a "cdylib", it tells the linker that the library is located in the
target/release
directory.Here is the output for
otool -l
:This means I can't install the shared library by copying the
.dylib
to/usr/local/lib
; I have to runinstall_name_tool
on the build result before distributing.I think building a library should set the name to something like
@rpath/librure.dylib
The text was updated successfully, but these errors were encountered: