@@ -1261,6 +1261,9 @@ supported_targets! {
12611261
12621262 ( "aarch64-unknown-nto-qnx710" , aarch64_unknown_nto_qnx_710) ,
12631263 ( "x86_64-pc-nto-qnx710" , x86_64_pc_nto_qnx710) ,
1264+
1265+ ( "aarch64-unknown-linux-ohos" , aarch64_unknown_linux_ohos) ,
1266+ ( "armv7-unknown-linux-ohos" , armv7_unknown_linux_ohos) ,
12641267}
12651268
12661269/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
@@ -1734,6 +1737,9 @@ pub struct TargetOptions {
17341737
17351738 /// Whether the target supports XRay instrumentation.
17361739 pub supports_xray : bool ,
1740+
1741+ /// Forces the use of emulated TLS (__emutls_get_address)
1742+ pub force_emulated_tls : bool ,
17371743}
17381744
17391745/// Add arguments for the given flavor and also for its "twin" flavors
@@ -1954,6 +1960,7 @@ impl Default for TargetOptions {
19541960 entry_name : "main" . into ( ) ,
19551961 entry_abi : Conv :: C ,
19561962 supports_xray : false ,
1963+ force_emulated_tls : false ,
19571964 }
19581965 }
19591966}
@@ -2605,6 +2612,7 @@ impl Target {
26052612 key ! ( entry_name) ;
26062613 key ! ( entry_abi, Conv ) ?;
26072614 key ! ( supports_xray, bool ) ;
2615+ key ! ( force_emulated_tls, bool ) ;
26082616
26092617 if base. is_builtin {
26102618 // This can cause unfortunate ICEs later down the line.
@@ -2859,6 +2867,7 @@ impl ToJson for Target {
28592867 target_option_val ! ( entry_name) ;
28602868 target_option_val ! ( entry_abi) ;
28612869 target_option_val ! ( supports_xray) ;
2870+ target_option_val ! ( force_emulated_tls) ;
28622871
28632872 if let Some ( abi) = self . default_adjusted_cabi {
28642873 d. insert ( "default-adjusted-cabi" . into ( ) , Abi :: name ( abi) . to_json ( ) ) ;
0 commit comments