mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 11:41:02 +00:00
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
--- a/src/bootstrap/builder.rs
|
|
+++ b/src/bootstrap/builder.rs
|
|
@@ -923,6 +923,21 @@
|
|
rustflags.arg("-Zsymbol-mangling-version=v0");
|
|
}
|
|
|
|
+ // Debian-specific stuff here
|
|
+ // don't error on warnings, this sometimes causes builds to fail when
|
|
+ // we re-bootstrap using the same version, that introduced a new warning
|
|
+ rustflags.arg("--cap-lints=warn");
|
|
+ // set linker flags from LDFLAGS
|
|
+ if let Ok(ldflags) = env::var("LDFLAGS") {
|
|
+ for flag in ldflags.split_whitespace() {
|
|
+ if target.contains("windows") && flag.contains("relro") {
|
|
+ // relro is ELF-specific
|
|
+ continue;
|
|
+ }
|
|
+ rustflags.arg(&format!("-Clink-args={}", flag));
|
|
+ }
|
|
+ }
|
|
+
|
|
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
|
|
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See
|
|
// #71458.
|