提交 7d06bdd4 编写于 作者: D Dominik Inführ

set frame pointer elimination attribute for main

The rustc-generated function `main` should respect the same config for
frame pointer elimination as the rest of code.
上级 f9f45c6d
......@@ -1196,6 +1196,9 @@ fn create_entry_fn(ccx: &CrateContext,
}
let llfn = declare::declare_cfn(ccx, "main", llfty);
// `main` should respect same config for frame pointer elimination as rest of code
attributes::set_frame_pointer_elimination(ccx, llfn);
let llbb = unsafe {
llvm::LLVMAppendBasicBlockInContext(ccx.llcx(), llfn, "top\0".as_ptr() as *const _)
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册