mark win32 binaries as large address aware
By default, 32-bit Windows executables are restricted to 2GiB of address space even when running on 64-bit Windows when 4GiB is available. Closes #17043
This commit is contained in:
parent
d8a26184dc
commit
c6633fde53
@ -1019,6 +1019,12 @@ fn link_args(cmd: &mut Command,
|
||||
|
||||
// Mark all dynamic libraries and executables as compatible with ASLR
|
||||
cmd.arg("-Wl,--dynamicbase");
|
||||
|
||||
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
|
||||
// space available to x86 Windows binaries on x86_64.
|
||||
if sess.targ_cfg.arch == abi::X86 {
|
||||
cmd.arg("-Wl,--large-address-aware");
|
||||
}
|
||||
}
|
||||
|
||||
if sess.targ_cfg.os == abi::OsAndroid {
|
||||
|
Loading…
x
Reference in New Issue
Block a user