mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-27 19:16:36 +00:00
the linker arguments can be *very* long, especially for crates with many dependencies. some parts of them are not very useful. unless specifically requested: - omit object files specific to the current invocation - fold rlib files into a single braced argument (in shell expansion format) this shortens the output significantly without removing too much information.
14 lines
341 B
Rust
14 lines
341 B
Rust
fn main() {
|
|
for arg in std::env::args() {
|
|
match &*arg {
|
|
"run_make_info" => println!("foo"),
|
|
"run_make_warn" => eprintln!("warning: bar"),
|
|
"run_make_error" => {
|
|
eprintln!("error: baz");
|
|
std::process::exit(1);
|
|
}
|
|
_ => (),
|
|
}
|
|
}
|
|
}
|