Skip to content

Commit 328adc4

Browse files
committed
rustdoc shim respects RUSTC_HOST_FLAGS
1 parent e6f5186 commit 328adc4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/bootstrap/src/bin/rustdoc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ fn main() {
4040
if !args.iter().any(|arg| arg == "--sysroot") {
4141
cmd.arg("--sysroot").arg(&sysroot);
4242
}
43+
} else {
44+
// Find any host flags that were passed by bootstrap.
45+
// The flags are stored in a RUSTC_HOST_FLAGS variable, separated by spaces.
46+
if let Ok(flags) = std::env::var("RUSTC_HOST_FLAGS") {
47+
cmd.args(flags.split(' '));
48+
}
4349
}
4450

4551
cmd.args(&args);

0 commit comments

Comments
 (0)