Skip to content

Commit 9f65115

Browse files
committed
propagate --target only if target is not host
Passing `--target` alters `RUSTFLAGS` in the build scripts. Since there is no reason to pass them when building for the host triple, exclude them if the target is the host triple. Signed-off-by: onur-ozkan <[email protected]>
1 parent 3f10032 commit 9f65115

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bootstrap/src/core/builder.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1343,10 +1343,9 @@ impl<'a> Builder<'a> {
13431343
Color::Auto => {} // nothing to do
13441344
}
13451345

1346-
if cmd != "install" {
1346+
if target != compiler.host {
1347+
assert!(cmd != "install", "`x install` can only be called for the host triple.");
13471348
cargo.arg("--target").arg(target.rustc_target_arg());
1348-
} else {
1349-
assert_eq!(target, compiler.host);
13501349
}
13511350

13521351
if self.config.rust_optimize.is_release() {

0 commit comments

Comments
 (0)