]> git.proxmox.com Git - rustc.git/blame - src/librustc_target/spec/l4re_base.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / librustc_target / spec / l4re_base.rs
CommitLineData
9fa01778 1use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
3b2f2976 2use std::default::Default;
0531ce1d 3//use std::process::Command;
3b2f2976
XL
4
5// Use GCC to locate code for crt* libraries from the host, not from L4Re. Note
6// that a few files also come from L4Re, for these, the function shouldn't be
7// used. This uses GCC for the location of the file, but GCC is required for L4Re anyway.
0531ce1d
XL
8//fn get_path_or(filename: &str) -> String {
9// let child = Command::new("gcc")
10// .arg(format!("-print-file-name={}", filename)).output()
11// .expect("Failed to execute GCC");
12// String::from_utf8(child.stdout)
13// .expect("Couldn't read path from GCC").trim().into()
14//}
3b2f2976 15
0531ce1d
XL
16pub fn opts() -> TargetOptions {
17 let mut args = LinkArgs::new();
18 args.insert(LinkerFlavor::Gcc, vec![]);
3b2f2976 19
0531ce1d 20 TargetOptions {
3b2f2976
XL
21 executables: true,
22 has_elf_tls: false,
3b2f2976 23 panic_strategy: PanicStrategy::Abort,
0531ce1d
XL
24 linker: Some("ld".to_string()),
25 pre_link_args: args,
3b2f2976
XL
26 target_family: Some("unix".to_string()),
27 .. Default::default()
0531ce1d 28 }
3b2f2976 29}