Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Dec 2, 2024
1 parent e5dc303 commit 1aaae7e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions crate_universe/src/metadata/cargo_tree_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,18 @@ impl TreeResolver {
// This is unfortunately a bit of a hack. See:
// - https://github.com/rust-lang/cargo/issues/9863
// - https://github.com/bazelbuild/rules_rust/issues/1662
let child = self
.cargo_bin
.command()?
let mut command = self.cargo_bin.command()?;

command
// These next two environment variables are used to hack cargo into using a custom
// host triple instead of the host triple detected by rustc.
.env("RUSTC_WRAPPER", rustc_wrapper)
.env("HOST_TRIPLE", host_triple)
.current_dir(manifest_path.parent().expect("All manifests should have a valid parent."))
.current_dir(
manifest_path
.parent()
.expect("All manifests should have a valid parent."),
)
.arg("tree")
.arg("--manifest-path")
.arg(manifest_path)
Expand All @@ -162,7 +166,9 @@ impl TreeResolver {
.arg("--charset=ascii")
.arg("--workspace")
.arg("--target")
.arg(target_triple)
.arg(target_triple);
debug!("Cargo tree command: {:#?}", command);
let child = command
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
Expand Down

0 comments on commit 1aaae7e

Please sign in to comment.