Files
rust/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs
Josh Triplett c3fbafddc0 Update targets to use target_abi
All eabi targets have target_abi = "eabi".
All eabihf targets have target_abi = "eabihf".
armv6_unknown_freebsd and armv7_unknown_freebsd have target_abi = "eabihf".
All abi64 targets have target_abi = "abi64".
All ilp32 targets have target_abi = "ilp32".
All softfloat targets have target_abi = "softfloat".
All *-uwp-windows-* targets have target_abi = "uwp".
All spe targets have target_abi = "spe".
All macabi targets have target_abi = "macabi".
aarch64-apple-ios-sim has target_abi = "sim".
x86_64-fortanix-unknown-sgx has target_abi = "fortanix".
x86_64-unknown-linux-gnux32 has target_abi = "x32".

Add FIXME entries for targets for which existing values need to change
once cfg_target_abi becomes stable. (All of them are tier 3 targets.)

Add a test for target_abi in `--print cfg`.
2021-07-07 08:52:35 -07:00

39 lines
1.3 KiB
Rust

use crate::spec::{LinkArgs, LinkerFlavor, LldFlavor, TargetOptions};
pub fn opts() -> TargetOptions {
let base = super::windows_gnu_base::opts();
// FIXME: This should be updated for the exception machinery changes from #67502
// and inherit from `windows_gnu_base`, at least partially.
let mut late_link_args = LinkArgs::new();
let late_link_args_dynamic = LinkArgs::new();
let late_link_args_static = LinkArgs::new();
let mingw_libs = vec![
//"-lwinstorecompat".to_string(),
//"-lmingwex".to_string(),
//"-lwinstorecompat".to_string(),
"-lwinstorecompat".to_string(),
"-lruntimeobject".to_string(),
"-lsynchronization".to_string(),
"-lvcruntime140_app".to_string(),
"-lucrt".to_string(),
"-lwindowsapp".to_string(),
"-lmingwex".to_string(),
"-lmingw32".to_string(),
];
late_link_args.insert(LinkerFlavor::Gcc, mingw_libs.clone());
late_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), mingw_libs);
TargetOptions {
abi: "uwp".to_string(),
vendor: "uwp".to_string(),
executables: false,
limit_rdylib_exports: false,
late_link_args,
late_link_args_dynamic,
late_link_args_static,
..base
}
}