Skip to content

Commit aaf6a25

Browse files
committed
Rename force_emulated_tls to use_emulated_tls
1 parent f4b84d2 commit aaf6a25

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,8 +2191,8 @@ pub struct TargetOptions {
21912191
/// Whether the target supports XRay instrumentation.
21922192
pub supports_xray: bool,
21932193

2194-
/// Forces the use of emulated TLS (__emutls_get_address)
2195-
pub force_emulated_tls: bool,
2194+
/// Use emulated TLS (__emutls_get_address)
2195+
pub use_emulated_tls: bool,
21962196
}
21972197

21982198
/// Add arguments for the given flavor and also for its "twin" flavors
@@ -2408,7 +2408,7 @@ impl Default for TargetOptions {
24082408
entry_name: "main".into(),
24092409
entry_abi: Conv::C,
24102410
supports_xray: false,
2411-
force_emulated_tls: false,
2411+
use_emulated_tls: false,
24122412
}
24132413
}
24142414
}
@@ -3112,7 +3112,7 @@ impl Target {
31123112
key!(entry_name);
31133113
key!(entry_abi, Conv)?;
31143114
key!(supports_xray, bool);
3115-
key!(force_emulated_tls, bool);
3115+
key!(use_emulated_tls, bool);
31163116

31173117
if base.is_builtin {
31183118
// This can cause unfortunate ICEs later down the line.
@@ -3368,7 +3368,7 @@ impl ToJson for Target {
33683368
target_option_val!(entry_name);
33693369
target_option_val!(entry_abi);
33703370
target_option_val!(supports_xray);
3371-
target_option_val!(force_emulated_tls);
3371+
target_option_val!(use_emulated_tls);
33723372

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

0 commit comments

Comments
 (0)