oxidize-rb / rb-sys

Easily build Ruby native extensions in Rust
https://oxidize-rb.github.io/rb-sys/
Apache License 2.0
230 stars 35 forks source link

Cleanup invalid dylib id reference on mac #414

Closed ianks closed 2 months ago

ianks commented 2 months ago

Sometimes, automated tools will use otool -L determine if there are invalid libraries linked to gems. Cargo will set the id to something like target/debug/libfoo.dylib, which becomes incorrect when rb-sys moves the file to a .bundle. So, we strip the ID out with install_name_tool.