I'm using a plugin (https://github.com/EnzymeAD/Enzyme) to perform some custom passes at link time with LLD. On my linux machines, I pass the flag --load-pass-plugin=/path/to/my/plugin.so, and everything seems to be working. However, on my mac, when I do --load-pass-plugin=/path/to/my/plugin.dylib, I get an error message:
Initially, I thought this was an issue with the Enzyme plugin itself, but @wsmoses did some investigation and believes that the issue might be in LLVM proper. See original discussion here: https://github.com/EnzymeAD/Enzyme/issues/1389#issuecomment-1697347166, duplicated below for completeness
Yeah though the actual LLVM linker only has support for plugins inside the ELF subcomponent itself, and not the MachO (macOS) subcomponent, so there is no support for plugins.
Recompiling LLVM won't add support, its a feature that needs to be added to upstream LLVM.
The old pass manager pipeline exists across all versions, but the new pass manager only exists for ELF.
Hi,
I'm using a plugin (https://github.com/EnzymeAD/Enzyme) to perform some custom passes at link time with LLD. On my linux machines, I pass the flag
--load-pass-plugin=/path/to/my/plugin.so
, and everything seems to be working. However, on my mac, when I do--load-pass-plugin=/path/to/my/plugin.dylib
, I get an error message:Initially, I thought this was an issue with the Enzyme plugin itself, but @wsmoses did some investigation and believes that the issue might be in LLVM proper. See original discussion here: https://github.com/EnzymeAD/Enzyme/issues/1389#issuecomment-1697347166, duplicated below for completeness