Hello there.
I have a Rust compiler (version 1.68.2) installed. Recently I also build the Rust compiler from source (version 1.70.0-dev) using the command ./x.py build library
.
Now when I compile a simple Rust program with rustc
, and then compile the same program using my build compiler with rustc +stage1
, the two executables vary significantly in file size and amount of included functions.
When compiling with rustc +stage1
and using a disassembler, it shows that it contains 1456 functions, as opposed to 652 functions when using rustc
.
I know that the stage1 compiler is not the full rustc build, and that one can build a stage2 compiler wich is considered the full rustc build. Now my question is, can I expect to produce executables that are close to rustc
compiled executables (in file size and included functions) just by using the stage2 compiler? Or is there something else to consider?