1
Fork 0

Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.

This commit is contained in:
Luqman Aden 2021-06-04 19:47:28 -07:00
parent f434217aab
commit a26f00357f
2 changed files with 3 additions and 90 deletions

View file

@ -1089,7 +1089,8 @@ pub fn ignored_for_lto(sess: &Session, info: &CrateInfo, cnum: CrateNum) -> bool
&& (info.compiler_builtins == Some(cnum) || info.is_no_builtins.contains(&cnum))
}
fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
// This functions tries to determine the appropriate linker (and corresponding LinkerFlavor) to use
pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
fn infer_from(
sess: &Session,
linker: Option<PathBuf>,