Skip to content

Commit

Permalink
Remove CrossLangLto::NoLink which does not have a use case anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Jul 6, 2018
1 parent 72df804 commit 4a26964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/librustc/session/config.rs
Expand Up @@ -99,16 +99,14 @@ pub enum Lto {
pub enum CrossLangLto {
LinkerPlugin(PathBuf),
LinkerPluginAuto,
NoLink,
Disabled
}

impl CrossLangLto {
pub fn enabled(&self) -> bool {
match *self {
CrossLangLto::LinkerPlugin(_) |
CrossLangLto::LinkerPluginAuto |
CrossLangLto::NoLink => true,
CrossLangLto::LinkerPluginAuto => true,
CrossLangLto::Disabled => false,
}
}
Expand Down Expand Up @@ -1031,8 +1029,7 @@ macro_rules! options {
}

*slot = match v {
None |
Some("no-link") => CrossLangLto::NoLink,
None => CrossLangLto::LinkerPluginAuto,
Some(path) => CrossLangLto::LinkerPlugin(PathBuf::from(path)),
};
true
Expand Down Expand Up @@ -3147,7 +3144,7 @@ mod tests {
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());

opts = reference.clone();
opts.debugging_opts.cross_lang_lto = CrossLangLto::NoLink;
opts.debugging_opts.cross_lang_lto = CrossLangLto::LinkerPluginAuto;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
}

Expand Down
3 changes: 1 addition & 2 deletions src/librustc_codegen_llvm/back/linker.rs
Expand Up @@ -471,8 +471,7 @@ impl<'a> Linker for GccLinker<'a> {

fn cross_lang_lto(&mut self) {
match self.sess.opts.debugging_opts.cross_lang_lto {
CrossLangLto::Disabled |
CrossLangLto::NoLink => {
CrossLangLto::Disabled => {
// Nothing to do
}
CrossLangLto::LinkerPluginAuto => {
Expand Down

0 comments on commit 4a26964

Please sign in to comment.