rust-lang / rustc_codegen_cranelift

Cranelift based backend for rustc
Apache License 2.0
1.59k stars 100 forks source link

Implement emutls #1296

Open bjorn3 opened 1 year ago

bjorn3 commented 1 year ago

While all supported targets currently have native tls support, this may not be the case in the future. In those cases we will need to implement emutls instead. This consists of defining a global variable of type __emutls_control and then call __emutls_get_address for every access. This function is provided by libgcc or libcompiler_rt.