Skip to content

Commit 4fe167a

Browse files
committed
Use the right TLS model for CloudABI.
CloudABI doesn't do dynamic linking. For this reason, there is no need to handle any other TLS model than local-exec. CloudABI's C library doesn't provide a __tls_get_addr() function to do Dynamic TLS. By forcing local-exec to be used here, we ensure that we don't generate function calls to __tls_get_addr().
1 parent d5f2745 commit 4fe167a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_back/target/cloudabi_base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub fn opts() -> TargetOptions {
2727
linker_is_gnu: true,
2828
pre_link_args: args,
2929
position_independent_executables: true,
30+
tls_model: "local-exec".to_string(),
3031
relro_level: RelroLevel::Full,
3132
exe_allocation_crate: super::maybe_jemalloc(),
3233
.. Default::default()

0 commit comments

Comments
 (0)