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 {
240240 match & mut self . 0 {
241241 Init => {
242242 match this. tcx . sess . target . os . as_ref ( ) {
243- "linux" => {
243+ "linux" | "freebsd" | "android" => {
244244 // Run the pthread dtors.
245245 self . 0 = PthreadDtors ( Default :: default ( ) ) ;
246246 }
@@ -257,10 +257,16 @@ impl TlsDtorsState {
257257 // And move to the final state.
258258 self . 0 = Done ;
259259 }
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?
262263 self . 0 = Done ;
263264 }
265+ os => {
266+ throw_unsup_format ! (
267+ "the TLS machinery does not know how to handle OS `{os}`"
268+ ) ;
269+ }
264270 }
265271 }
266272 PthreadDtors ( state) => {
You can’t perform that action at this time.
0 commit comments