-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mk: Stop using cmake for compiler-rt #34873
mk: Stop using cmake for compiler-rt #34873
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #34606) made this pull request unmergeable. Please resolve the merge conflicts. |
c881d84
to
d6c0fc2
Compare
@bors r+ |
📌 Commit d6c0fc2 has been approved by |
|
||
let mut out_of_date = false; | ||
for src in sources { | ||
let src = build.src.join("src/compiler-rt/lib/builtins").join(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustc
will fail to compile here. That argument to join
there should be src
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, indeed!
d6c0fc2
to
c0ccbf1
Compare
@bors: r=brson c0ccbf1 |
⌛ Testing commit c0ccbf1 with merge 0ab82ae... |
💔 Test failed - auto-mac-32-opt |
c0ccbf1
to
7b68f17
Compare
@bors: r=brson |
📌 Commit 7b68f17 has been approved by |
@bors: p=1 Blocking the LLVM upgrade which is blocking MIR |
⌛ Testing commit 7b68f17 with merge c97c785... |
💔 Test failed - auto-win-msvc-64-opt |
We're not writing C code, so there's not really much of a reason for us to get warnings and errors from code we haven't written!
fb25076
to
f168d17
Compare
@bors: r=brson |
📌 Commit f168d17 has been approved by |
⌛ Testing commit f168d17 with merge c2d81d5... |
💔 Test failed - auto-linux-64-cross-freebsd |
⌛ Testing commit 0a66ae3 with merge 22abe50... |
💔 Test failed - auto-linux-64-x-android-t |
The compiler-rt build system has been a never ending cause of pain for Rust unfortunately: * The build system is very difficult to invoke and configure to only build compiler-rt, especially across platforms. * The standard build system doesn't actually do what we want, not working for some of our platforms and requiring a significant number of patches on our end which are difficult to apply when updating compiler-rt. * Compiling compiler-rt requires LLVM to be compiled, which... is a big dependency! This also means that over time compiler-rt is not guaranteed to build against older versions of LLVM (or newer versions), and we often want to work with multiple versions of LLVM simultaneously. The makefiles and rustbuild already know how to compile C code, the code here is far from the *only* C code we're compiling. This patch jettisons all logic to work with compiler-rt's build system and just goes straight to the source. We just list all files manually (copied from compiler-rt's lib/builtins/CMakeLists.txt) and compile them into an archive. It's likely that this means we'll fail to pick up new files when we upgrade compiler-rt, but that seems like a much less significant cost to pay than what we're currently paying. cc rust-lang#34400, first steps towards that
0a66ae3
to
ee6011f
Compare
@bors: r=brson |
📌 Commit ee6011f has been approved by |
⌛ Testing commit ee6011f with merge cc548ca... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
@bors: retry
|
⌛ Testing commit ee6011f with merge a33622c... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
⌛ Testing commit ee6011f with merge e7c822c... |
…=brson mk: Stop using cmake for compiler-rt The compiler-rt build system has been a never ending cause of pain for Rust unfortunately: * The build system is very difficult to invoke and configure to only build compiler-rt, especially across platforms. * The standard build system doesn't actually do what we want, not working for some of our platforms and requiring a significant number of patches on our end which are difficult to apply when updating compiler-rt. * Compiling compiler-rt requires LLVM to be compiled, which... is a big dependency! This also means that over time compiler-rt is not guaranteed to build against older versions of LLVM (or newer versions), and we often want to work with multiple versions of LLVM simultaneously. The makefiles and rustbuild already know how to compile C code, the code here is far from the *only* C code we're compiling. This patch jettisons all logic to work with compiler-rt's build system and just goes straight to the source. We just list all files manually (copied from compiler-rt's lib/builtins/CMakeLists.txt) and compile them into an archive. It's likely that this means we'll fail to pick up new files when we upgrade compiler-rt, but that seems like a much less significant cost to pay than what we're currently paying. cc #34400, first steps towards that
💔 Test failed - auto-win-gnu-32-opt |
\o/ That took quite some time |
@alexcrichton wins another epic battle with @bors 🎉 |
What's up with the two gcc crates in Cargo.lock? |
@Ms2ger one's from git and one's from crates.io |
Remove CMake workaround This isn't needed anymore as we aren't using CMake to build compiler-rt since rust-lang#34873.
The compiler-rt build system has been a never ending cause of pain for Rust
unfortunately:
compiler-rt, especially across platforms.
some of our platforms and requiring a significant number of patches on our end
which are difficult to apply when updating compiler-rt.
dependency! This also means that over time compiler-rt is not guaranteed to
build against older versions of LLVM (or newer versions), and we often want to
work with multiple versions of LLVM simultaneously.
The makefiles and rustbuild already know how to compile C code, the code here is
far from the only C code we're compiling. This patch jettisons all logic to
work with compiler-rt's build system and just goes straight to the source. We
just list all files manually (copied from compiler-rt's
lib/builtins/CMakeLists.txt) and compile them into an archive.
It's likely that this means we'll fail to pick up new files when we upgrade
compiler-rt, but that seems like a much less significant cost to pay than what
we're currently paying.
cc #34400, first steps towards that