Compile LLVM with Clang on release builders#50200
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
WIP: Compile LLVM with Clang on release builders Attempting to cache in on some rustc compile time wins mentioned in #49879 (comment)
|
Gonna run this through perf to see if we can verify the build improvements. Unfortunately I wasn't seeing much of an improvement locally, so I'm hoping that a more controlled environment like perf.r-l.o can show some better numbers perhaps. |
This comment has been minimized.
This comment has been minimized.
fe703f1 to
9c31468
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9c31468 to
0843b9b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - status-travis |
0843b9b to
c993c6e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Same error, maybe legit? |
|
Indeed yeah, it's a legit issue. I can reproduce the hang locally, and hilariously enough the hang here is in a build script for miniz-sys. Turns out the build script just... never exits. It's not an sccache issue and it's not a the-build-script-executed-clang issue. Presumably it's a build-script-was-linked-by-clang issue, but that seems crazy. Looking at |
|
So we're not only compiling LLVM with clang but we're also compiling things like jemalloc with clang. The segfault was somewhere deep within jemalloc on an instruction which was moving from memory which I believe required at least 8 byte alignment (maybe 16?) and didn't have that alignment. That's what caused the segfault itself, and as to why the build script wasn't taken down I'm gonna chalk that up to "probably some glibc bug fixed in the last decade". Presumably clang is just making different assumptions about stack alignment than gcc is? Not entirely sure. In the meantime I'm now testing passing |
Currently on CI we predominately compile LLVM with the default system compiler which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang 6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This looks to generate faster code according to rust-lang#49879 which translates to a faster rustc (as LLVM internally is faster) The major changes here were to the containers that build Linux releases, basically adding a new step that uses the previous gcc 4.8 compiler to compile the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been updated to download precompiled versions of Clang 6 and configure the build to use them. Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as well as an update to `sccache` on Windows which was needed to correctly work with `clang-cl`. Finally the MinGW compiler is entirely left out here intentionally as it's currently thought that Clang can't generate C++ code for MinGW and we need to use gcc, but this should be verified eventually.
|
@bors: r=kennytm Seems to have fixed the issue |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit 61e1f23 has been approved by |
|
@bors: r=kennytm |
|
📌 Commit 7e5b9ac has been approved by |
|
⌛ Testing commit 7e5b9ac with merge 04d50c76ea59e11a0dcd8ac6a36d8be47ad29614... |
|
💔 Test failed - status-travis |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors: retry No major slowdown from the previous successful run: otherwise I think the new docker image just took awhile to build |
|
💔 Test failed - status-travis |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors retry 3 hour timeout.
|
|
☀️ Test successful - status-appveyor, status-travis |
|
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (one for each failed bors run) |
|
omg it worked! |
|
The results for small crates are pretty spectacular and for larger crates they are rather good too: Thanks for all the work all of you have put into this PR! |
|
Wow! That's an impressive amount of green! |
Attempting to cache in on some rustc compile time wins mentioned in #49879 (comment)