summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/windows_msvc_base.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_target/src/spec/windows_msvc_base.rs')
-rw-r--r--compiler/rustc_target/src/spec/windows_msvc_base.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/windows_msvc_base.rs b/compiler/rustc_target/src/spec/windows_msvc_base.rs
new file mode 100644
index 000000000..21062c337
--- /dev/null
+++ b/compiler/rustc_target/src/spec/windows_msvc_base.rs
@@ -0,0 +1,34 @@
+use crate::spec::{cvs, TargetOptions};
+
+pub fn opts() -> TargetOptions {
+ let base = super::msvc_base::opts();
+
+ TargetOptions {
+ os: "windows".into(),
+ env: "msvc".into(),
+ vendor: "pc".into(),
+ dynamic_linking: true,
+ dll_prefix: "".into(),
+ dll_suffix: ".dll".into(),
+ exe_suffix: ".exe".into(),
+ staticlib_prefix: "".into(),
+ staticlib_suffix: ".lib".into(),
+ families: cvs!["windows"],
+ crt_static_allows_dylibs: true,
+ crt_static_respected: true,
+ 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,
+ has_thread_local: true,
+
+ ..base
+ }
+}