rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
174 stars 55 forks source link

Do not unconditionally set the target. #323

Closed ehuss closed 3 months ago

ehuss commented 4 months ago

This removes the CARGO_BUILD_TARGET environment variable which causes cargo to unconditionally work in "cross compile mode". This is different from a normal cargo invocation without the --target flag, in which case it runs in "host mode", where cargo and other tools have distinctly different behavior. This can be surprising when you get one behavior with cargo build and a different one with cargo bisect-rustc.

This was added in #159 to address some issue with using cross-rs with cargo bisect-rustc. I'm not sure why, as I would think the recommended behavior when using cross is to set the --target flag. The given PR didn't really explain the situation.

Closes #284

ehuss commented 4 months ago

I realize I made a mistake, it should set the target if the user sets --target on the command-line.