提交 76a3852b 编写于 作者: A Alex Crichton

rollup merge of #22184: nagisa/revert-emissions

This resulted in some very unexpected fallout such as empty llvm-ir, llvm-bc and asm in some cases.
See #22183 for related info.

r? @alexcrichton
......@@ -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| {
*ty == config::CrateTypeExecutable
});
let emit_link = session.opts.output_types.iter().any(|ty| {
*ty == config::OutputTypeExe
});
if !any_exe || !emit_link {
if !any_exe {
// No need to find a main function
return
}
......
-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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册