|
| 1 | +use crate::spec::{LinkerFlavor, Target, TargetResult, PanicStrategy}; |
| 2 | +use std::env; |
| 3 | + |
| 4 | +pub fn target() -> TargetResult { |
| 5 | + let mut base = super::windows_uwp_msvc_base::opts(); |
| 6 | + base.max_atomic_width = Some(64); |
| 7 | + base.has_elf_tls = true; |
| 8 | + |
| 9 | + // FIXME: this shouldn't be panic=abort, it should be panic=unwind |
| 10 | + base.panic_strategy = PanicStrategy::Abort; |
| 11 | + |
| 12 | + let lib_root_path = env::var("VCToolsInstallDir").expect("VCToolsInstallDir not found in env"); |
| 13 | + base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap() |
| 14 | + .push(format!("{}{}{}", "/LIBPATH:".to_string(), lib_root_path, "lib\\arm64\\store".to_string())); |
| 15 | + |
| 16 | + Ok(Target { |
| 17 | + llvm_target: "aarch64-pc-windows-msvc".to_string(), |
| 18 | + target_endian: "little".to_string(), |
| 19 | + target_pointer_width: "64".to_string(), |
| 20 | + target_c_int_width: "32".to_string(), |
| 21 | + data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), |
| 22 | + arch: "aarch64".to_string(), |
| 23 | + target_os: "windows".to_string(), |
| 24 | + target_env: "msvc".to_string(), |
| 25 | + target_vendor: "uwp".to_string(), |
| 26 | + linker_flavor: LinkerFlavor::Msvc, |
| 27 | + options: base, |
| 28 | + }) |
| 29 | +} |
0 commit comments