Skip to content

Commit 2f48651

Browse files
committed
This resulted in some very unexpected fallout such as empty llvm-ir, llvm-bc and asm in some cases. See rust-lang#22183 for related info.
1 parent 1500df8 commit 2f48651

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/librustc/middle/entry.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ pub fn find_entry_point(session: &Session, ast_map: &ast_map::Map) {
5050
let any_exe = session.crate_types.borrow().iter().any(|ty| {
5151
*ty == config::CrateTypeExecutable
5252
});
53-
let emit_link = session.opts.output_types.iter().any(|ty| {
54-
*ty == config::OutputTypeExe
55-
});
56-
if !any_exe || !emit_link {
53+
if !any_exe {
5754
// No need to find a main function
5855
return
5956
}

src/test/run-make/empty-file/Makefile

-5
This file was deleted.

src/test/run-make/empty-file/empty.rs

Whitespace-only changes.

0 commit comments

Comments
 (0)