1
- use crate :: spec:: base:: apple:: { opts, visionos_sim_llvm_target, Arch } ;
2
- use crate :: spec:: { FramePointer , SanitizerSet , Target , TargetOptions } ;
1
+ use crate :: spec:: base:: apple:: { opts, pre_link_args , visionos_sim_llvm_target, Arch } ;
2
+ use crate :: spec:: { FramePointer , MaybeLazy , SanitizerSet , Target , TargetOptions } ;
3
3
4
4
pub fn target ( ) -> Target {
5
- let arch = Arch :: Arm64_sim ;
6
- let mut base = opts ( "visionos" , arch) ;
5
+ const OS : & str = "visionos" ;
6
+ const ARCH : Arch = Arch :: Arm64_sim ;
7
+
8
+ let mut base = opts ( OS , ARCH , MaybeLazy :: lazy ( || pre_link_args ( OS , ARCH ) ) ) ;
7
9
base. supported_sanitizers = SanitizerSet :: ADDRESS | SanitizerSet :: THREAD ;
8
10
9
11
Target {
10
- llvm_target : visionos_sim_llvm_target ( arch ) . into ( ) ,
12
+ llvm_target : MaybeLazy :: lazy ( || visionos_sim_llvm_target ( ARCH ) ) ,
11
13
metadata : crate :: spec:: TargetMetadata {
12
14
description : Some ( "ARM64 Apple visionOS simulator" . into ( ) ) ,
13
15
tier : Some ( 3 ) ,
@@ -16,7 +18,7 @@ pub fn target() -> Target {
16
18
} ,
17
19
pointer_width : 64 ,
18
20
data_layout : "e-m:o-i64:64-i128:128-n32:64-S128" . into ( ) ,
19
- arch : arch . target_arch ( ) ,
21
+ arch : ARCH . target_arch ( ) ,
20
22
options : TargetOptions {
21
23
features : "+neon,+fp-armv8,+apple-a16" . into ( ) ,
22
24
max_atomic_width : Some ( 128 ) ,
0 commit comments