Add -Z dep-info-omit-d-target
to control dep-info style
This avoids a breaking change to dep-info output, putting the gcc/clang-compliant dep-info behavior behind a flag
This commit is contained in:
parent
7e99764df3
commit
8c09d29d04
2 changed files with 6 additions and 2 deletions
|
@ -1236,6 +1236,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
|||
overriding the default for the current target"),
|
||||
human_readable_cgu_names: bool = (false, parse_bool, [TRACKED],
|
||||
"generate human-readable, predictable names for codegen units"),
|
||||
dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED],
|
||||
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
|
||||
themselves"),
|
||||
}
|
||||
|
||||
pub fn default_lib_output() -> CrateType {
|
||||
|
|
|
@ -1162,8 +1162,9 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, crate_name: &str) {
|
|||
out_filenames.push(p);
|
||||
}
|
||||
}
|
||||
// Do not include the dep-info file in itself as a target
|
||||
OutputType::DepInfo => { }
|
||||
OutputType::DepInfo if sess.opts.debugging_opts.dep_info_omit_d_target => {
|
||||
// Don't add the dep-info output when omitting it from dep-info targets
|
||||
}
|
||||
_ => {
|
||||
out_filenames.push(file);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue