> Strongly prefer to upstream all patches to LLVM before including them in rustc.
That is, this is already the case. We don't like maintaining a fork. We try to upstream as much as we can.
But, at the same time, even when you do this, it takes tons of time. A contributor was talking about exactly this on Twitter earlier today, and estimated that, even if the patch was written and accepted as fast as possible, it would still take roughly a year for that patch to make it into the release used by Rust. This is the opposite side of the whole "move slow and only use old versions of things" tradeoff: that would take even longer to get into, say, the LLVM in Debian stable, as suggested in another comment chain.
So our approach is, upstream the patches, keep them in our fork, and then remove them when they inevitably make it back downstream.
(EDIT: Also, what Rusky said: there's basically always going to be more than one patch, in various stages of this process...)
links to https://rustc-dev-guide.rust-lang.org/building/suggested.htm...
... which is broken. I'll file a docs bug. Can't do it right this moment, but will in a day or two.
It is not my area of expertise, but I believe the way you do it is to set this option: https://github.com/rust-lang/rust/blob/master/config.toml.ex...
buuut the dockerfile for the llvm 9 build passes this flag as an argument: https://github.com/rust-lang/rust/blob/5a549d36ee81b226d1672...
Thanks for the answer.