]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_target/spec/windows_uwp_base.rs
Auto merge of #68414 - michaelwoerister:share-drop-glue, r=alexcrichton
[rust.git] / src / librustc_target / spec / windows_uwp_base.rs
index 108dbc417cbb307ccc563993cc042b18790785e2..b19c4dd7eb18c15cb624465e0791ae7f68a68cac 100644 (file)
@@ -3,29 +3,34 @@
 
 pub fn opts() -> TargetOptions {
     let mut pre_link_args = LinkArgs::new();
-    pre_link_args.insert(LinkerFlavor::Gcc, vec![
+    pre_link_args.insert(
+        LinkerFlavor::Gcc,
+        vec![
             // Tell GCC to avoid linker plugins, because we are not bundling
             // them with Windows installer, and Rust does its own LTO anyways.
             "-fno-use-linker-plugin".to_string(),
-
             // Always enable DEP (NX bit) when it is available
             "-Wl,--nxcompat".to_string(),
-        ]);
+        ],
+    );
 
     let mut late_link_args = LinkArgs::new();
-    late_link_args.insert(LinkerFlavor::Gcc, vec![
-        //"-lwinstorecompat".to_string(),
-        //"-lmingwex".to_string(),
-        //"-lwinstorecompat".to_string(),
-        "-lwinstorecompat".to_string(),
-        "-lruntimeobject".to_string(),
-        "-lsynchronization".to_string(),
-        "-lvcruntime140_app".to_string(),
-        "-lucrt".to_string(),
-        "-lwindowsapp".to_string(),
-        "-lmingwex".to_string(),
-        "-lmingw32".to_string(),
-    ]);
+    late_link_args.insert(
+        LinkerFlavor::Gcc,
+        vec![
+            //"-lwinstorecompat".to_string(),
+            //"-lmingwex".to_string(),
+            //"-lwinstorecompat".to_string(),
+            "-lwinstorecompat".to_string(),
+            "-lruntimeobject".to_string(),
+            "-lsynchronization".to_string(),
+            "-lvcruntime140_app".to_string(),
+            "-lucrt".to_string(),
+            "-lwindowsapp".to_string(),
+            "-lmingwex".to_string(),
+            "-lmingw32".to_string(),
+        ],
+    );
 
     TargetOptions {
         // FIXME(#13846) this should be enabled for windows
@@ -46,19 +51,15 @@ pub fn opts() -> TargetOptions {
         pre_link_objects_exe: vec![
             "rsbegin.o".to_string(), // Rust compiler runtime initialization, see rsbegin.rs
         ],
-        pre_link_objects_dll: vec![
-            "rsbegin.o".to_string(),
-        ],
+        pre_link_objects_dll: vec!["rsbegin.o".to_string()],
         late_link_args,
-        post_link_objects: vec![
-            "rsend.o".to_string(),
-        ],
+        post_link_objects: vec!["rsend.o".to_string()],
         custom_unwind_resume: true,
         abi_return_struct_as_int: true,
         emit_debug_gdb_scripts: false,
         requires_uwtable: true,
         limit_rdylib_exports: false,
 
-        .. Default::default()
+        ..Default::default()
     }
 }