Add tls_model for cygwin and enable has_thread_local

This commit is contained in:
Berrysoft
2025-05-29 13:55:50 +08:00
committed by 王宇逸
parent 5f025f363d
commit 9281958c6a

View File

@@ -1,7 +1,8 @@
use std::borrow::Cow; use std::borrow::Cow;
use crate::spec::{ use crate::spec::{
BinaryFormat, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions, cvs, BinaryFormat, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions, TlsModel,
cvs,
}; };
pub(crate) fn opts() -> TargetOptions { pub(crate) fn opts() -> TargetOptions {
@@ -44,6 +45,8 @@ pub(crate) fn opts() -> TargetOptions {
eh_frame_header: false, eh_frame_header: false,
debuginfo_kind: DebuginfoKind::Dwarf, debuginfo_kind: DebuginfoKind::Dwarf,
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
tls_model: TlsModel::Emulated,
has_thread_local: true,
..Default::default() ..Default::default()
} }
} }