diff options
| -rw-r--r-- | src/librustc_trans/base.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index 977ababbf56..47b6fdc740a 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -1196,6 +1196,9 @@ pub fn maybe_create_entry_wrapper(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 _) }; |
