Skip to content

Commit 5367776

Browse files
committed
Auto merge of #31579 - ollie27:msvc_link, r=alexcrichton
/LARGEADDRESSAWARE is already enabled for i686-pc-windows-gnu so we should probably be consistent. https://msdn.microsoft.com/en-us/library/wz223b1z.aspx /SAFESEH is a good thing to enable by default. https://msdn.microsoft.com/en-us/library/9a89h429.aspx
2 parents 7fc4df6 + c3320c0 commit 5367776

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/librustc_back/target/i686_pc_windows_msvc.rs

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ pub fn target() -> Target {
1414
let mut base = super::windows_msvc_base::opts();
1515
base.cpu = "pentium4".to_string();
1616

17+
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
18+
// space available to x86 Windows binaries on x86_64.
19+
base.pre_link_args.push("/LARGEADDRESSAWARE".to_string());
20+
21+
// Ensure the linker will only produce an image if it can also produce a table of
22+
// the image's safe exception handlers.
23+
// https://msdn.microsoft.com/en-us/library/9a89h429.aspx
24+
base.pre_link_args.push("/SAFESEH".to_string());
25+
1726
Target {
1827
llvm_target: "i686-pc-windows-msvc".to_string(),
1928
target_endian: "little".to_string(),

0 commit comments

Comments
 (0)