mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #5171 - rtsuk:gn-compatible-depfiles, r=alexcrichton
Gn compatible depfiles Fixes https://github.com/rust-lang/cargo/issues/5162.
This commit is contained in:
commit
e540fd157c
@ -70,7 +70,15 @@ pub fn output_depinfo<'a, 'b>(context: &mut Context<'a, 'b>, unit: &Unit<'a>) ->
|
||||
let mut deps = HashSet::new();
|
||||
let mut visited = HashSet::new();
|
||||
let success = add_deps_for_unit(&mut deps, context, unit, &mut visited).is_ok();
|
||||
let basedir = None; // TODO
|
||||
let basedir_string;
|
||||
let basedir = match context.config.get_path("build.dep-info-basedir")? {
|
||||
Some(value) => {
|
||||
basedir_string = value.val.as_os_str().to_str().
|
||||
ok_or_else(|| internal("build.dep-info-basedir path not utf-8"))?.to_string();
|
||||
Some(basedir_string.as_str())
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
for &(_, ref link_dst, _) in context.target_filenames(unit)?.iter() {
|
||||
if let Some(ref link_dst) = *link_dst {
|
||||
let output_path = link_dst.with_extension("d");
|
||||
|
@ -104,6 +104,7 @@ target = "triple" # build for the target triple
|
||||
target-dir = "target" # path of where to place all generated artifacts
|
||||
rustflags = ["..", ".."] # custom flags to pass to all compiler invocations
|
||||
incremental = true # whether or not to enable incremental compilation
|
||||
dep-info-basedir = ".." # full path for the base directory for targets in depfiles
|
||||
|
||||
[term]
|
||||
verbose = false # whether cargo provides verbose output
|
||||
|
Loading…
x
Reference in New Issue
Block a user