Skip to content

Commit 0091a15

Browse files
committed
auto merge of #11502 : jhasse/rust/crate_type, r=alexcrichton
This is unnecessary and also leads to a bug: When the user specifies ``` #[crate_type = "rlib"]; ``` rustpkg still creates a dylib. Also it's good not to duplicate functionality. `build_session_options` handles this just fine.
2 parents f42440b + e64b49d commit 0091a15

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/librustpkg/util.rs

-5
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ pub fn compile_input(context: &BuildContext,
185185
let csysroot = context.sysroot();
186186
debug!("compile_input's sysroot = {}", csysroot.display());
187187

188-
let crate_type = match what {
189-
Lib => session::OutputDylib,
190-
Test | Bench | Main => session::OutputExecutable,
191-
};
192188
let matches = getopts(debug_flags()
193189
+ match what {
194190
Lib => ~[~"--lib"],
@@ -230,7 +226,6 @@ pub fn compile_input(context: &BuildContext,
230226
debug!("Output type = {:?}", output_type);
231227

232228
let options = @session::options {
233-
outputs: ~[crate_type],
234229
optimize: opt,
235230
test: what == Test || what == Bench,
236231
maybe_sysroot: Some(sysroot_to_use),

0 commit comments

Comments
 (0)