Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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().
  • Loading branch information
EdSchouten committed Jan 1, 2018
commit 4fe167adba47478e1a443c7b82e67e020253eac8
1 change: 1 addition & 0 deletions src/librustc_back/target/cloudabi_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub fn opts() -> TargetOptions {
linker_is_gnu: true,
pre_link_args: args,
position_independent_executables: true,
tls_model: "local-exec".to_string(),
relro_level: RelroLevel::Full,
exe_allocation_crate: super::maybe_jemalloc(),
.. Default::default()
Expand Down