diff --git a/build.rs b/build.rs index d515e86..7e95e6b 100644 --- a/build.rs +++ b/build.rs @@ -121,7 +121,7 @@ fn compile_probe(rustc_bootstrap: bool) -> bool { .arg("--edition=2018") .arg("--crate-name=anyhow") .arg("--crate-type=lib") - .arg("--emit=metadata") + .arg("--emit=dep-info,metadata") .arg("--out-dir") .arg(out_dir) .arg(probefile); diff --git a/build/probe.rs b/build/probe.rs index 1dfc244..21e776d 100644 --- a/build/probe.rs +++ b/build/probe.rs @@ -30,3 +30,6 @@ impl Error for MyError { } const _: fn(&dyn Error) -> Option<&Backtrace> = |err| error::request_ref::(err); + +// Include in sccache cache key. +const _: Option<&str> = option_env!("RUSTC_BOOTSTRAP");