File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
collector/src/compile/execute Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,11 @@ impl<'a> CargoProcess<'a> {
155
155
// env vars set, but it doesn't hurt to have them.
156
156
. env ( "RUSTC" , & * FAKE_RUSTC )
157
157
. env ( "RUSTC_REAL" , & self . toolchain . components . rustc )
158
+ // If the collector is being run with e.g. `cargo run --bin collector`,
159
+ // then the CARGO environment variable will be incorrectly propagated to nested cargo
160
+ // invocations (e.g. in the `cargo llvm-lines` profiler). This environment variable
161
+ // makes sure that we override the path to Cargo with the specified cargo component.
162
+ . env ( "CARGO" , & self . toolchain . components . cargo )
158
163
// We separately pass -Cincremental to the leaf crate --
159
164
// CARGO_INCREMENTAL is cached separately for both the leaf crate
160
165
// and any in-tree dependencies, and we don't want that; it wastes
You can’t perform that action at this time.
0 commit comments