]> git.lizzy.rs Git - rust.git/commit
Auto merge of #44906 - dkl:main-signature, r=nagisa
authorbors <bors@rust-lang.org>
Sun, 1 Oct 2017 09:14:53 +0000 (09:14 +0000)
committerbors <bors@rust-lang.org>
Sun, 1 Oct 2017 09:14:53 +0000 (09:14 +0000)
commit0defa208dcb5a0f3c1ca5bc4df7acf52759ece44
treea5e7afb6aa8722ffde1533ae1c0ddc288a19e446
parent1c09315f6d7559aaaa23baa92f753ce6f86dff65
parenta4e83731e9aa0cd1a412b090626ace6aa54250bb
Auto merge of #44906 - dkl:main-signature, r=nagisa

Fix native main() signature on 64bit

Hello,

in LLVM-IR produced by rustc on x86_64-linux-gnu, the native main() function had incorrect types for the function result and argc parameter: i64, while it should be i32 (really c_int). See also #20064, #29633.

So I've attempted a fix here. I tested it by checking the LLVM IR produced with --target x86_64-unknown-linux-gnu and i686-unknown-linux-gnu. Also I tried running the tests (`./x.py test`), however I'm getting two failures with and without the patch, which I'm guessing is unrelated.
src/librustc_trans/base.rs