diff options
| author | bors <bors@rust-lang.org> | 2016-02-13 13:44:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-13 13:44:02 +0000 |
| commit | 5367776bd123789a0cc7c9ab38f979c8455b0edd (patch) | |
| tree | 9a20124cdd61b583aa70f7ea75c287e34ee5720b | |
| parent | 7fc4df6d230f81537886f11c57483e0cb61f0948 (diff) | |
| parent | c3320c04986cc3dcb6b0c6ab9e1b896bda493c61 (diff) | |
| download | rust-5367776bd123789a0cc7c9ab38f979c8455b0edd.tar.gz rust-5367776bd123789a0cc7c9ab38f979c8455b0edd.zip | |
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
| -rw-r--r-- | src/librustc_back/target/i686_pc_windows_msvc.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc_back/target/i686_pc_windows_msvc.rs b/src/librustc_back/target/i686_pc_windows_msvc.rs index 96b2d37ab20..7fe65906189 100644 --- a/src/librustc_back/target/i686_pc_windows_msvc.rs +++ b/src/librustc_back/target/i686_pc_windows_msvc.rs @@ -14,6 +14,15 @@ pub fn target() -> Target { let mut base = super::windows_msvc_base::opts(); base.cpu = "pentium4".to_string(); + // Mark all dynamic libraries and executables as compatible with the larger 4GiB address + // space available to x86 Windows binaries on x86_64. + base.pre_link_args.push("/LARGEADDRESSAWARE".to_string()); + + // Ensure the linker will only produce an image if it can also produce a table of + // the image's safe exception handlers. + // https://msdn.microsoft.com/en-us/library/9a89h429.aspx + base.pre_link_args.push("/SAFESEH".to_string()); + Target { llvm_target: "i686-pc-windows-msvc".to_string(), target_endian: "little".to_string(), |
