1
Fork 0

Support TLS access into dylibs on Windows

This commit is contained in:
John Kåre Alsaker 2023-02-03 09:04:12 +01:00
parent 51c93553d4
commit 0d89c6a2d4
23 changed files with 207 additions and 47 deletions

View file

@ -65,6 +65,10 @@ pub(super) fn mangle<'tcx>(
)
.unwrap();
if let ty::InstanceDef::ThreadLocalShim(..) = instance.def {
let _ = printer.write_str("{{tls-shim}}");
}
if let ty::InstanceDef::VTableShim(..) = instance.def {
let _ = printer.write_str("{{vtable-shim}}");
}

View file

@ -42,6 +42,7 @@ pub(super) fn mangle<'tcx>(
// Append `::{shim:...#0}` to shims that can coexist with a non-shim instance.
let shim_kind = match instance.def {
ty::InstanceDef::ThreadLocalShim(_) => Some("tls"),
ty::InstanceDef::VTableShim(_) => Some("vtable"),
ty::InstanceDef::ReifyShim(_) => Some("reify"),