Is it possible to load compiler plugins through
rustc in some way? For reference , Clang allows for
clang -Xclang -load -Xclang LLVMPolly.so whereas
opt -load LLVMPolly.so in order to enable optimization passes provided through plugins. (link to Polly: http://polly.llvm.org/).
rustc -C llvm-args=--help | grep load , it seems the
--load flag is stripped (as opposed to
--load being available when running
opt --help). Is there a specific reason for that?
You can try to look in the GitHub issues / PRs about Polly - some people put quite a bit of effort integrating it into rustc
Thanks, yeah I did see that. Though, for me still question is why not allow for compiler plugins in general. That seems like a low hanging fruit without adding a lot of maintenance cost to the Rust compiler. (Also interesting to see the discussion on the LLVM mailing list on that: https://lists.llvm.org/pipermail/llvm-dev/2018-January/120677.html where Polly will not become part of mainline soon .)