Skip to content

Commit

Permalink
solved
Browse files Browse the repository at this point in the history
  • Loading branch information
heisen-li committed Apr 7, 2024
1 parent 11d3591 commit 19abb7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cargo/core/compiler/fingerprint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,11 +1526,14 @@ See https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-change
.collect::<CargoResult<Vec<_>>>()?
};

let rustflags = build_runner.bcx.rustflags_args(unit).to_vec();

Ok(Fingerprint {
local: Mutex::new(local),
rustc: util::hash_u64(&build_runner.bcx.rustc().verbose_version),
deps,
outputs: if overridden { Vec::new() } else { vec![output] },
rustflags,

// Most of the other info is blank here as we don't really include it
// in the execution of the build script, but... this may be a latent
Expand Down
5 changes: 4 additions & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5578,6 +5578,9 @@ fn build_script_rerun_when_target_rustflags_change() {
[RUNNING] [..]
",
)
.with_stdout("")
.with_stdout(
"\
hello",
)
.run();
}

0 comments on commit 19abb7b

Please sign in to comment.