I decided to make my first pull request to rustc. Everything was fine, I build rustc using LLVM build from CI and it worked good, I made PR and it was almost ready...
Until I needed to bless some tests because some MIR output changed.
Then, I learned that I need to build unoptimized LLVM to do this on my Ubuntu PC. It was very hard, I spent 2 days for this.
First, I just failed to build it few times because it just fails to find few headers. After few tries, I made a wild guess and switched compiler from gcc to clang with this changes in config.toml.
[target.x86_64-unknown-linux-gnu] cc = "clang-11" cxx = "clang++-11"
Then it started to compile but it used almost all place on my little SSD and compilation constantly killed by OOM.
Then I decided to build it on my gaming PC. It runs Windows so I needed to setup HyperV and run a VM.
And still all build take more than 4 hours with 10 cores (I need to limit number of cores because some compilation processed was still killed by OOM with higher parallelizm) and it used near 53 Gb of RAM during linking. Also,
build folder have 66G size.
Are there any thoughts to move blessing to some build agents? I think, we cut some possible contributors from work because they just haven't such good machines. I have 64 gb RAM on my PC but I don't know anyone other who has.
It woulds be nice if we can call something like
@bors bless-tests to generate commit with blessed tests.
Finally, I think that we should
- update docs and mention, that it is possible to use LLVM from CI (I noticed that only from reading config.toml), and mention that user should use
clangas compiler (this I got only from my guess);
- add some way to bless tests using CI because it is too hard task for average computer.
P.S. And a PR which I made if anybody wants to see how confused I was during a process.
P.S.S. And all config.toml changes which I made to bless tests:
[llvm] ... optimize = false ... [build] ... profiler = true ... [target.x86_64-unknown-linux-gnu] cc = "clang-11" cxx = "clang++-11"