Don't attempt duplicate outputs

This ends up causing weird errors like those seen in #11346

Closes #11346
This commit is contained in:
Alex Crichton 2014-01-06 09:23:24 -08:00
parent bae091e517
commit b7e58ce554
3 changed files with 8 additions and 1 deletions

View File

@ -192,7 +192,7 @@ pub enum EntryFnType {
EntryNone,
}
#[deriving(Eq, Clone)]
#[deriving(Eq, Clone, TotalOrd, TotalEq)]
pub enum OutputStyle {
OutputExecutable,
OutputDylib,
@ -461,6 +461,8 @@ pub fn collect_outputs(session: &Session,
if base.len() == 0 {
base.push(OutputExecutable);
}
base.sort();
base.dedup();
return base;
}

View File

@ -0,0 +1,4 @@
include ../tools.mk
all:
$(RUSTC) --rlib foo.rs

View File

@ -0,0 +1 @@
#[crate_type = "rlib"];