1
Fork 0

rustc_target: Add convenience functions for adding linker arguments

They ensure that lld and non-lld linker flavors get the same set of arguments
This commit is contained in:
Vadim Petrochenkov 2022-06-17 17:38:42 +03:00
parent 8aab472d52
commit 46aba8850b
74 changed files with 347 additions and 419 deletions

View file

@ -3,7 +3,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions};
pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-mspe".into());
base.add_pre_link_args(LinkerFlavor::Gcc, &["-mspe"]);
base.max_atomic_width = Some(32);
Target {