6 ms·
(Re)Using rustc components in gccrs
- pitaj 2y agoMakes sense
- theobeers 2y agoAn interesting bit, on not making it too easy for people to circumvent the borrow checker: > First, we use a C++ compiler to build gccrs, disabling the borrow-checking pass of the compiler. It is important to ensure borrow-checking cannot be disabled at runtime using a command line flag, as this could have a negative impact on the Rust ecosystem – however, building gccrs without borrow-checking to use it as an intermediate compiler in our bootstrapping process is okay.
- loeg 2y agoLove seeing updates / progress on gccrs.
- PoignardAzur 2y agoI'm kind of curious how many components you can jettison from a Rust compiler and still be able to build these libraries. It's not like Polonius or the trait solver were designed with bootstrapping gccrs in mind.
- HelloNurse 2y agoIf these compiler components were designed to conform to almost implementation-agnostic bootstrapping stages (e.g. compiling the borrow checker without checking borrows) organizing gccrs bootstrapping like rustc bootstrapping enables reuse.
- PoignardAzur 2y ago> If these compiler components were designed to conform to almost implementation-agnostic bootstrapping stages I'm pretty sure they weren't. The Rust bootstrap chain is ridiculously long.
- jenadine 2y agoWhy not reuse the whole frontend then?
- AndrewDucker 2y agoBecause we want to plug into GCC, so that we can use the rest of the compiler chain to output to all of the architectures that GCC supports.
- vlovich123 2y agoYou still get that by using the same Rust frontend and using GCC instead of LLVM as the backend. A parallel reimplemented from scratch front end at best lets you find under-specified aspects of the current implementation. Not sure it actually helps the ecosystem though.
- mcronce 2y agoYou're describing rustc_codegen_gcc
- vlovich123 2y agoCorrect. I’m saying that the justification provided: > Because we want to plug into GCC, so that we can use the rest of the compiler chain to output to all of the architectures that GCC supports. is invalidated by rust_codegen_gcc and thus is not a good reason for a new frontend.
- HelloNurse 2y agoDiscovery and improvement of "under-specified aspects of the current implementation" can have a large practical impact, and implementing a standard (the Rust language) more than once so that it ceases to have a dominant "current implementation" (rustc) is even more important.
- vlovich123 2y ago