rui314 / mold

Mold: A Modern Linker 🦠
MIT License
14.3k stars 470 forks source link

[macOS Apple Silicon] Add support for -undefined dynamic_lookup #647

Open nsabovic opened 2 years ago

nsabovic commented 2 years ago

When compiling napi-rs (Node.js addons in Rust) the Rust compilation fails with

note: mold: fatal: unknown command line option: -undefined

The relevant flags are "-fuse-ld=/opt/homebrew/bin/ld64.mold" "-Wl" "-undefined" "dynamic_lookup".

pan93412 commented 2 years ago

I also encountered that, and seems like Mold has not been supported -undefined dynamic_lookup in their codebase. Hopefully it can be fixed so I can fully adopt mold in my projects ;)

kiufta commented 2 years ago

I've got this issue with Paddle: https://github.com/PaddlePaddle/Paddle/issues/45761

rui314 commented 2 years ago

Thank you guys for reporting. Let me take a look.