YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.5k stars 895 forks source link

Makefile: add -rdynamic on macOS to fix plugins with LTO #4680

Closed widlarizer closed 2 weeks ago

widlarizer commented 1 month ago

Prior to this change, some symbols would be missing from the yosys executable if built on macOS with LTO. This would break plugins on dlopen. By adding -rdynamic to the linker flags, we can export all symbols even if they're unused due to LTO-enabled inlining or otherwise. You can check the exported symbols by building yosys with LTO on macOS and running objdump --macho --exports-trie yosys.

widlarizer commented 2 weeks ago

Oh well