rust/src/librustc_target/spec/hermit_base.rs
Stefan Lankes c1e440a90f redesign of the interface to the unikernel HermitCore
- the old interface between HermitCore and the Rust Standard Library
  based on a small C library (newlib)
- remove this interface and call directly the unikernel
- remove the dependency to the HermitCore linker
- use rust-lld as linker
2019-10-06 15:26:14 +00:00

26 lines
834 B
Rust

use crate::spec::{LldFlavor, LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
use std::default::Default;
pub fn opts() -> TargetOptions {
let mut pre_link_args = LinkArgs::new();
pre_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), vec![
"--build-id".to_string(),
"--hash-style=gnu".to_string(),
"--Bstatic".to_string(),
]);
TargetOptions {
linker: Some("rust-lld".to_owned()),
executables: true,
has_elf_tls: true,
linker_is_gnu: true,
pre_link_args,
no_default_libraries: true,
panic_strategy: PanicStrategy::Abort,
position_independent_executables: true,
relocation_model: "static".to_string(),
target_family: None,
tls_model: "initial-exec".to_string(),
.. Default::default()
}
}