diff options
| author | Ed Schouten <ed@nuxi.nl> | 2018-01-01 21:46:22 +0100 |
|---|---|---|
| committer | Ed Schouten <ed@nuxi.nl> | 2018-01-01 21:46:22 +0100 |
| commit | 4fe167adba47478e1a443c7b82e67e020253eac8 (patch) | |
| tree | 8ca781ffcf3f1b172e9c0abcf7a40d065e6161de | |
| parent | d5f2745e7ccd247da50f0cb18318ac477e5bccbf (diff) | |
| download | rust-4fe167adba47478e1a443c7b82e67e020253eac8.tar.gz rust-4fe167adba47478e1a443c7b82e67e020253eac8.zip | |
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().
| -rw-r--r-- | src/librustc_back/target/cloudabi_base.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_back/target/cloudabi_base.rs b/src/librustc_back/target/cloudabi_base.rs index 3353e7936f0..c41c6b23358 100644 --- a/src/librustc_back/target/cloudabi_base.rs +++ b/src/librustc_back/target/cloudabi_base.rs @@ -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() |
