Revert #22051
This resulted in some very unexpected fallout such as empty llvm-ir, llvm-bc and asm in some cases. See #22183 for related info.
This commit is contained in:
parent
1500df8934
commit
2f48651111
3 changed files with 1 additions and 9 deletions
|
@ -50,10 +50,7 @@ pub fn find_entry_point(session: &Session, ast_map: &ast_map::Map) {
|
||||||
let any_exe = session.crate_types.borrow().iter().any(|ty| {
|
let any_exe = session.crate_types.borrow().iter().any(|ty| {
|
||||||
*ty == config::CrateTypeExecutable
|
*ty == config::CrateTypeExecutable
|
||||||
});
|
});
|
||||||
let emit_link = session.opts.output_types.iter().any(|ty| {
|
if !any_exe {
|
||||||
*ty == config::OutputTypeExe
|
|
||||||
});
|
|
||||||
if !any_exe || !emit_link {
|
|
||||||
// No need to find a main function
|
// No need to find a main function
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
-include ../tools.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(RUSTC) --emit=asm,llvm-bc,llvm-ir,obj,dep-info empty.rs
|
|
||||||
$(RUSTC) --emit=link --crate-type=rlib,dylib,staticlib empty.rs
|
|
Loading…
Add table
Add a link
Reference in a new issue