rustc_target: Add a compatibility layer to separate internal and user-facing linker flavors
This commit is contained in:
parent
4f9898a794
commit
7dc186ff7e
5 changed files with 152 additions and 61 deletions
|
@ -1236,7 +1236,8 @@ pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
|
|||
|
||||
// linker and linker flavor specified via command line have precedence over what the target
|
||||
// specification specifies
|
||||
if let Some(ret) = infer_from(sess, sess.opts.cg.linker.clone(), sess.opts.cg.linker_flavor) {
|
||||
let linker_flavor = sess.opts.cg.linker_flavor.map(LinkerFlavor::from_cli);
|
||||
if let Some(ret) = infer_from(sess, sess.opts.cg.linker.clone(), linker_flavor) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue