]> git.lizzy.rs Git - rust.git/commitdiff
Enable /SAFESEH for i686-pc-windows-msvc
authorOliver Middleton <olliemail27@gmail.com>
Tue, 9 Feb 2016 17:20:32 +0000 (17:20 +0000)
committerOliver Middleton <olliemail27@gmail.com>
Thu, 11 Feb 2016 12:07:57 +0000 (12:07 +0000)
src/librustc_back/target/i686_pc_windows_msvc.rs

index 7079df1ab3b8e94a9a94a3b3306665d34c979c46..7fe6590618941acfaa55182e7bfb484d64404be6 100644 (file)
@@ -18,6 +18,11 @@ pub fn target() -> Target {
     // 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(),