Skip to content

Commit 460b92a

Browse files
committed
rustc: Declare rust_start as a function
Issue #2167
1 parent 9e1e42d commit 460b92a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/rustc/middle/trans/base.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -4497,9 +4497,7 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
44974497
let crate_map = ccx.crate_map;
44984498
let start_ty = T_fn([val_ty(rust_main), ccx.int_type, ccx.int_type,
44994499
val_ty(crate_map)], ccx.int_type);
4500-
let start = str::as_c_str("rust_start", {|buf|
4501-
llvm::LLVMAddGlobal(ccx.llmod, start_ty, buf)
4502-
});
4500+
let start = decl_cdecl_fn(ccx.llmod, "rust_start", start_ty);
45034501
let args = [rust_main, llvm::LLVMGetParam(llfn, 0 as c_uint),
45044502
llvm::LLVMGetParam(llfn, 1 as c_uint), crate_map];
45054503
let result = unsafe {

0 commit comments

Comments
 (0)