Skip to content

Commit

Permalink
Do not unconditionally set the target.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Mar 2, 2024
1 parent 9411af3 commit 8b481b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion guide/src/examples/rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -e

cargo doc

grep "some example text" $CARGO_TARGET_DIR/$CARGO_BUILD_TARGET/doc/mycrate/fn.foo.html
grep "some example text" $CARGO_TARGET_DIR/doc/mycrate/fn.foo.html
```

This can be used with the `--script` option:
Expand Down
2 changes: 1 addition & 1 deletion guide/src/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ COUNT=`echo "$OUTPUT" | grep -c "unnecessary parentheses"`
test $COUNT -eq 1
```

If you need to use the targets directly without using `cargo` in the script, they are available in `$CARGO_TARGET_DIR/$CARGO_BUILD_TARGET/[release|debug]/...`, since `cargo-bisect-rustc` sets `$CARGO_TARGET_DIR` and `$CARGO_BUILD_TARGET`.
If you need to use the targets directly without using `cargo` in the script, they are available in `$CARGO_TARGET_DIR/[release|debug]/...`, since `cargo-bisect-rustc` sets `$CARGO_TARGET_DIR`.

Check out the [examples chapters](examples/index.md) for several examples of how to use this option.
1 change: 0 additions & 1 deletion src/toolchains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ impl Toolchain {
};
cmd.current_dir(&cfg.args.test_dir);
cmd.env("CARGO_TARGET_DIR", format!("target-{}", self.rustup_name()));
cmd.env("CARGO_BUILD_TARGET", &cfg.target);

// let `cmd` capture stderr for us to process afterward.
let must_capture_output = cfg.args.regress.must_process_stderr();
Expand Down

0 comments on commit 8b481b8

Please sign in to comment.