Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/compiler/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ counted_array!(static ARGS: [ArgInfo<ArgData>; _] = [
take_arg!("--crate-name", String, CanBeSeparated('='), CrateName),
take_arg!("--crate-type", ArgCrateTypes, CanBeSeparated('='), CrateType),
take_arg!("--deny", OsString, CanBeSeparated('='), PassThrough),
take_arg!("--diagnostic-width", OsString, CanBeSeparated('='), PassThrough),
take_arg!("--emit", String, CanBeSeparated('='), Emit),
take_arg!("--error-format", OsString, CanBeSeparated('='), PassThrough),
take_arg!("--explain", OsString, CanBeSeparated('='), NotCompilation),
Expand Down Expand Up @@ -1452,11 +1453,16 @@ where
let (mut sortables, rest): (Vec<_>, Vec<_>) = os_string_arguments
.iter()
// We exclude a few arguments from the hash:
// -L, --extern, --out-dir
// -L, --extern, --out-dir, --diagnostic-width
// These contain paths which aren't relevant to the output, and the compiler inputs
// in those paths (rlibs and static libs used in the compilation) are used as hash
// inputs below.
.filter(|&(arg, _)| !(arg == "--extern" || arg == "-L" || arg == "--out-dir"))
.filter(|&(arg, _)| {
!(arg == "--extern"
|| arg == "-L"
|| arg == "--out-dir"
|| arg == "--diagnostic-width")
})
// We also exclude `--target` if it specifies a path to a .json file. The file content
// is used as hash input below.
// If `--target` specifies a string, it continues to be hashed as part of the arguments.
Expand Down Expand Up @@ -3716,6 +3722,7 @@ proc_macro false
"foo.rs",
"--out-dir",
"out",
"--diagnostic-width=1",
"--extern",
"a=1",
"--crate-name",
Expand Down
Loading