]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_target/spec/windows_msvc_base.rs
linker: Pass `/NODEFAULTLIB` in a more regular way
[rust.git] / src / librustc_target / spec / windows_msvc_base.rs
index 78567a4382bed5dc4d0705f2d0a695b96f8919db..dc56dd916ff0b602d4186f39718d03cd4ff46ce0 100644 (file)
@@ -30,6 +30,16 @@ pub fn opts() -> TargetOptions {
         abi_return_struct_as_int: true,
         emit_debug_gdb_scripts: false,
         requires_uwtable: true,
+        // Currently we don't pass the /NODEFAULTLIB flag to the linker on MSVC
+        // as there's been trouble in the past of linking the C++ standard
+        // library required by LLVM. This likely needs to happen one day, but
+        // in general Windows is also a more controlled environment than
+        // Unix, so it's not necessarily as critical that this be implemented.
+        //
+        // Note that there are also some licensing worries about statically
+        // linking some libraries which require a specific agreement, so it may
+        // not ever be possible for us to pass this flag.
+        no_default_libraries: false,
 
         ..Default::default()
     }