-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow compiler plugins to be loaded from the command line #15446
Comments
cc @kmcallister |
Seems reasonable. For hardening options I was considering a generic way to specify crate-level attributes at the command line. I wonder if the same mechanism could accommodate both. |
@huonw Any pointers on where I should look? Also, |
@Manishearth: Re-use the implementation of |
Alright, thanks! |
@Manishearth did you make progress on this? |
I did, on the flight back. I'll finish it off today, once I get through these Servo reviews. |
Sweet! :D |
`rustc something.rs -L folder_with_plugin_dylib/ -Z extra-plugins=foo` works via this My way of testing this is by cloning https://github.com/Manishearth/rust-clippy, `cargo build`ing it, and then running `rustc examples/box_vec.rs -L target/ -Z extra-plugins=rust_clippy` after editing out the `exern crate rust_clippy` from `box_vec.rs` r? @huonw fixes #15446
Add status bar button to toggle check on save state Closes rust-lang/rust-analyzer#15440 cc rust-lang/rust-analyzer#13208
Currently the only way to load plugins is by having
#[phase(plugin)] extern crate foo;
in the source, but one can easily have plugins (lints etc.) that make sense to only load occasionally or that make sense to load into external crates in an automated fashion, where editing the source is hard (E.g. my spellck lint).This could be something like
-Z plugin=spellck -Z plugin=grammarck
etc. (-Z
since presumably this will be unstable.)The text was updated successfully, but these errors were encountered: