forward linker option to lint-docs · rust-lang/rust@4df28b8 (original) (raw)

Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ fn doit() -> Result<(), Box> {
27 27 let mut out_path = None;
28 28 let mut rustc_path = None;
29 29 let mut rustc_target = None;
30 +let mut rustc_linker = None;
30 31 let mut verbose = false;
31 32 let mut validate = false;
32 33 while let Some(arg) = args.next() {
@@ -55,6 +56,12 @@ fn doit() -> Result<(), Box> {
55 56 None => return Err("--rustc-target requires a value".into()),
56 57 };
57 58 }
59 +"--rustc-linker" => {
60 + rustc_linker = match args.next() {
61 +Some(s) => Some(s),
62 +None => return Err("--rustc-linker requires a value".into()),
63 +};
64 +}
58 65 "-v" | "--verbose" => verbose = true,
59 66 "--validate" => validate = true,
60 67 s => return Err(format!("unexpected argument `{}`", s).into()),
@@ -77,6 +84,7 @@ fn doit() -> Result<(), Box> {
77 84 out_path: &out_path.unwrap(),
78 85 rustc_path: &rustc_path.unwrap(),
79 86 rustc_target: &rustc_target.unwrap(),
87 +rustc_linker: rustc_linker.as_deref(),
80 88 verbose,
81 89 validate,
82 90 };