File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ impl TlsDtorsState {
240
240
match & mut self . 0 {
241
241
Init => {
242
242
match this. tcx . sess . target . os . as_ref ( ) {
243
- "linux" => {
243
+ "linux" | "freebsd" | "android" => {
244
244
// Run the pthread dtors.
245
245
self . 0 = PthreadDtors ( Default :: default ( ) ) ;
246
246
}
@@ -257,10 +257,16 @@ impl TlsDtorsState {
257
257
// And move to the final state.
258
258
self . 0 = Done ;
259
259
}
260
- _ => {
261
- // No TLS support for this platform, directly move to final state.
260
+ "wasi" | "none" => {
261
+ // No OS, no TLS dtors.
262
+ // FIXME: should we do something on wasi?
262
263
self . 0 = Done ;
263
264
}
265
+ os => {
266
+ throw_unsup_format ! (
267
+ "the TLS machinery does not know how to handle OS `{os}`"
268
+ ) ;
269
+ }
264
270
}
265
271
}
266
272
PthreadDtors ( state) => {
You can’t perform that action at this time.
0 commit comments