mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-18 00:43:21 +00:00
and drop those applied upstream/no longer needed Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 lines
853 B
Diff
22 lines
853 B
Diff
--- a/src/bootstrap/builder.rs
|
|
+++ b/src/bootstrap/builder.rs
|
|
@@ -974,6 +974,18 @@ impl<'a> Builder<'a> {
|
|
rustflags.arg("-Zsymbol-mangling-version=legacy");
|
|
}
|
|
|
|
+ // Debian-specific stuff here
|
|
+ // 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.
|