5 ms·
Rustc_codegen_GCC can now run libcore’s tests and pass most of them
- tux3 6y agoThis is a GCC codegen backend for rustc, so it gets to reuse the existing Rust frontend for free, but benefits from GCC's optimizations and support for more target architectures. Contrast with GCC Rust (https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-report-15/ https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-rep...), which is attacking the problem from the other side by building a GCC Rust frontend in C++. That one will help with bootstrapping, which currently has to go through mrustc and many rustc builds. It's very nice to see both of these progressing :)
- pedrocr 6y agoSeems like mrustc is up to 1.39: https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc Does the bootstrapping require every single step up to the current rustc or can it skip some steps?
- anp 6y agoIt looks like this bootstrap chain script goes through each stable version in turn, although it hasn’t been updated to latest mrustc: https://android.googlesource.com/platform/prebuilts/rust/+/refs/tags/android-mainline-11.0.0_r3/bootstrap/ https://android.googlesource.com/platform/prebuilts/rust/+/r....
- madars 6y agoYou can bootstrap up at least 1.50 https://gitlab.com/stikonas/gentoo-bootstrap/-/tree/master/dev-lang/rust https://gitlab.com/stikonas/gentoo-bootstrap/-/tree/master/d... (latest release is 1.52.1 so not too far off)
- yjftsjthsd-h 6y ago> Contrast with GCC Rust (https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-rep https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-rep...), which is attacking the problem from the other side by building a GCC Rust frontend in C++. That one will help with bootstrapping, which currently has to go through mrustc and many rustc builds. Wouldn't it depend on what kind of bootstrapping? It doesn't help with trusting trust, but rustc frontend + gcc backend would help with porting to a new platform, wouldn't it?
- sanxiyn 6y agoYes it would help with porting to a platform which is supported by GCC but not supported by LLVM. For a new platform it doesn't change anything. By definition neither GCC nor LLVM supports a new platform since it is new.
- deleted 6y ago[deleted]
- est31 6y ago> Contrast with GCC Rust (https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-rep https://thephilbert.io/2021/05/14/gcc-rust-weekly-status-rep...), which is attacking the problem from the other side by building a GCC Rust frontend in C++. That one will help with bootstrapping, which currently has to go through mrustc and many rustc builds. Note that GCC Rust won't help any more with bootstrapping than mrustc can help. Getting one rustc version to compile is only the start of a long process of following the evolution of the language and implementing weird implementation behaviours the compiler now relies on for its own compilation. You have to provide constant upkeep, and for that both mrustc and GCC Rust are suited equally well. On the other hand, rustc_codegen_gcc is way better suited for following the moving target, but obviously it can't be used for bootstrapping as it's written in Rust.
- riskable 6y agoAnyone have any comparison benchmarks? I'd love to see how GCC measures up to LLVM when it comes to Rust binaries. I'm also curious if the resulting binary size is any different.
- bluejekyll 6y agoThe article says, “This project is currently at the point where many programs can be compiled, but run incorrectly,” so comparing benchmarks at this point would probably be very misleading.
- Narishma 6y agoIt's too soon for that.
- deleted 6y ago[deleted]
- whoisthemachine 6y agoIs it possible yet to have Rust compile itself?
- hexane360 6y agoI believe that's the goal of Cranelift [1] and rustc's cg_clif [2]. 1: https://github.com/bytecodealliance/wasmtime/tree/main/cranelift https://github.com/bytecodealliance/wasmtime/tree/main/crane... 2: https://github.com/rust-lang/rust/pull/77975 https://github.com/rust-lang/rust/pull/77975
- jameshilliard 6y agoWould be nice if there was a bigger effort to make cross compilation actually useable with rust/cargo...basic stuff like cross compiling for a x86_64 target from a x86_64 host still isn't really supported yet.
- yakubin 6y agoWhat do you mean? Which of those steps doesn't work for you? <https://rust-lang.github.io/rustup/cross-compilation.html https://rust-lang.github.io/rustup/cross-compilation.html>
- antoyo 6y agoProbably they mean using the gcc backend. That seems like a huge hassle, but might be possible if rustup would distribute libgccjit configured for different architectures.