Skip to content

Commit 09a1b70

Browse files
committed
Rename force_emulated_tls to use_emulated_tls
1 parent dad074c commit 09a1b70

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl OwnedTargetMachine {
3939
split_dwarf_file: &CStr,
4040
output_obj_file: &CStr,
4141
debug_info_compression: &CStr,
42-
force_emulated_tls: bool,
42+
use_emulated_tls: bool,
4343
args_cstr_buff: &[u8],
4444
) -> Result<Self, LlvmError<'static>> {
4545
assert!(args_cstr_buff.len() > 0);
@@ -71,7 +71,7 @@ impl OwnedTargetMachine {
7171
split_dwarf_file.as_ptr(),
7272
output_obj_file.as_ptr(),
7373
debug_info_compression.as_ptr(),
74-
force_emulated_tls,
74+
use_emulated_tls,
7575
args_cstr_buff.as_ptr() as *const c_char,
7676
args_cstr_buff.len(),
7777
)

compiler/rustc_codegen_llvm/src/back/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub fn target_machine_factory(
223223

224224
let path_mapping = sess.source_map().path_mapping().clone();
225225

226-
let force_emulated_tls = sess.target.force_emulated_tls;
226+
let use_emulated_tls = sess.target.use_emulated_tls;
227227

228228
// copy the exe path, followed by path all into one buffer
229229
// null terminating them so we can use them as null terminated strings
@@ -297,7 +297,7 @@ pub fn target_machine_factory(
297297
&split_dwarf_file,
298298
&output_obj_file,
299299
&debuginfo_compression,
300-
force_emulated_tls,
300+
use_emulated_tls,
301301
&args_cstr_buff,
302302
)
303303
})

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ pub fn exporting_symbol_name_for_instance_in_crate<'tcx>(
615615
) -> String {
616616
let undecorated = symbol_name_for_instance_in_crate(tcx, symbol, cnum);
617617

618-
if tcx.sess.target.force_emulated_tls
618+
if tcx.sess.target.use_emulated_tls
619619
&& let ExportedSymbol::NonGeneric(def_id) = symbol
620620
&& tcx.is_thread_local_static(def_id)
621621
{

compiler/rustc_target/src/spec/base/android.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn opts() -> TargetOptions {
55
base.os = "android".into();
66
base.is_like_android = true;
77
base.default_dwarf_version = 2;
8-
base.force_emulated_tls = true;
8+
base.use_emulated_tls = true;
99
base.has_thread_local = true;
1010
base.supported_sanitizers = SanitizerSet::ADDRESS;
1111
// This is for backward compatibility, see https://github.com/rust-lang/rust/issues/49867

compiler/rustc_target/src/spec/base/linux_ohos.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn opts() -> TargetOptions {
55

66
base.env = "ohos".into();
77
base.crt_static_default = false;
8-
base.force_emulated_tls = true;
8+
base.use_emulated_tls = true;
99
base.has_thread_local = false;
1010

1111
base

compiler/rustc_target/src/spec/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2195,8 +2195,8 @@ pub struct TargetOptions {
21952195
/// Whether the target supports XRay instrumentation.
21962196
pub supports_xray: bool,
21972197

2198-
/// Forces the use of emulated TLS (__emutls_get_address)
2199-
pub force_emulated_tls: bool,
2198+
/// Use emulated TLS (__emutls_get_address)
2199+
pub use_emulated_tls: bool,
22002200
}
22012201

22022202
/// Add arguments for the given flavor and also for its "twin" flavors
@@ -2416,7 +2416,7 @@ impl Default for TargetOptions {
24162416
entry_name: "main".into(),
24172417
entry_abi: Conv::C,
24182418
supports_xray: false,
2419-
force_emulated_tls: false,
2419+
use_emulated_tls: false,
24202420
}
24212421
}
24222422
}
@@ -3120,7 +3120,7 @@ impl Target {
31203120
key!(entry_name);
31213121
key!(entry_abi, Conv)?;
31223122
key!(supports_xray, bool);
3123-
key!(force_emulated_tls, bool);
3123+
key!(use_emulated_tls, bool);
31243124

31253125
if base.is_builtin {
31263126
// This can cause unfortunate ICEs later down the line.
@@ -3376,7 +3376,7 @@ impl ToJson for Target {
33763376
target_option_val!(entry_name);
33773377
target_option_val!(entry_abi);
33783378
target_option_val!(supports_xray);
3379-
target_option_val!(force_emulated_tls);
3379+
target_option_val!(use_emulated_tls);
33803380

33813381
if let Some(abi) = self.default_adjusted_cabi {
33823382
d.insert("default-adjusted-cabi".into(), Abi::name(abi).to_json());

0 commit comments

Comments
 (0)