Skip to content
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

Bump minimum LLVM version to LLVM 6 #55842

Closed
gnzlbg opened this issue Nov 10, 2018 · 34 comments
Closed

Bump minimum LLVM version to LLVM 6 #55842

gnzlbg opened this issue Nov 10, 2018 · 34 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 10, 2018

It's that time of the year again - almost 6 months since we bumped the minimum supported system LLVM to version 5 (#51899). Now that emscripten has been updated to LVM 6.0.1 (#55626 - thank you @nikic ) I wanted to bump the minimum supported version to 6.

However, there has been some controversy about the minimum supported LLVM version lagging too much behind the bundled one, resulting in a lot of frustration for both contributors, users, and packagers (https://internals.rust-lang.org/t/rust-vs-llvm/8604).

Supporting older versions is particularly problematic because:

  • we "take our time" upstreaming our patches, which are often required for things to work properly
  • rustc at best just bugs! on older LLVM versions when using some language features, at worst it silently compiles with incorrect codegen - distro packagers don't see tests failing because we/them silence them.

I don't know how aware are distro packagers of these issues. I know that @cuviper and @infinity0 are aware of them, e.g., when packaging for a distro often the testsuite has to "pass" but it only passes with system LLVMs because we basically silence all tests that do not pass.

That is, currently, even though we let Rust build silently with LLVM 5, many parts of the language / compiler are just unusable (SIMD, wasm, ...). This is currently also the case for LLVM 6, and even LLVM 7!

So I think it is worth to reconsider our stance on this. I personally think that we should come up with an enforceable policy about the minimum system LLVM version that we support, and that the policy has to be better than "the last 3 LLVM releases" to add any value. If we were to continuously support the last released LLVM version (version 7 right now), we could, slowly:

  • try to get most of the tests working properly on the supported system LLVM,
  • try to upstream most / all of our patches, provide workarounds in rustc for those that cannot be upstreamed.

Currently, because we support the last 4 LLVM releases, an upstreamed patch lets us remove code in rustc in ~2 - 2.5 years. If we were to only support the last LLVM version, that would be reduced to 6 months, making it significantly more profitable to upstream our patches. It might also make sense to keep workarounds around to keep things going if we know these only have to live for 6 months.

Also, it is unclear to me what's the value of shipping new Rust versions on distros using a 2 year old LLVM. Couldn't these distros just ship an older Rust version that's known to work with the distros LLVM version ? (by known I mean, where most tests pass instead of being silenced).

So what I'd like to know is:

  • is it possible at all for stakeholders to move to LLVM 7 now ? If not, why not?
  • what are the pros / cons of moving to LLVM now ?
  • do you think that a policy of supporting the last LLVM version (7 right now) is feasible?

I think that moving to something like that would be first step. And once everything is working release-wise for everybody, we can consider strengthening this policy to try to keep all / most tests running for one full LLVM release, and to at least encourage workarounds in rustc for the last LLVM version.

So what do you think? In particular, what do distro packagers thing? I know that @cuviper mentioned that Fedora 28 still only has LLVM6 and that it is supported till June 2019, but by ~February 2019 Rust will be targeting LLVM9 already which is released in August 2019.


cc @infinity0 @cuviper @Keruspe @glandium @alexcrichton

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 10, 2018

cc @djc

@nikic
Copy link
Contributor

nikic commented Nov 10, 2018

I think there is a bit of a misapprehension around how the rust LLVM fork works. The fork basically only contains two types of patches:

  • Build fixes for CI, because it uses very old glibc. This is not relevant for distros (or they already have their own patches anyway).
  • Backports of upstream commits. The baseline requirement is that all patches going into the fork must be reviewed and committed upstream first.

There are only two commits that do not fall into this category:

  • rust-lang/llvm@deaf37e -- this is a patch for some relatively unimportant optional functionality, but should definitely be upstreamed.
  • rust-lang/llvm@2ed1478 -- this is an optional improvement for the optimizer. It can't be upstreamed in this form. Upstreaming this would require introducing an interface in LLVM to register custom allocators, which would be quite a bit more work.

I'm writing this to clarify that generally the flow of patches is always from LLVM upstream to the rust fork, not the other way around. I think that the issue that you have in mind is really a different one, namely that we don't really keep track of which upstream patches are needed for what over time, and also don't request necessary upstream patches to be merged into previous LLVM point releases.

(Definitely +1 on dropping old LLVM support though, as long as distros are fine with it.)

@petrochenkov
Copy link
Contributor

petrochenkov commented Nov 10, 2018

LLVM 5.0 is barely a year old, and you are suggesting to abandon it already.
This is a requirement for people supporting LLVM forks (e.g. custom targets) to move at a quite speedy fashion.

One reasonable LLVM update policy is to migrate from X.0.1 to X+1.0.1 for reliability, rather than from X.0.0 to X+1.0.0.
With this policy update to LLVM 6 could start only since July 2018, that's only 4 months old.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 10, 2018

LLVM 5.0 is barely a year old, and you are suggesting to abandon it already.

To put things in perspective with respect to the release train: LLVM 5.0 was released in August 2017. If we decide to bump the minimum version, until the PR lands on nightly we are talking end of November 2018, 6 weeks later it lands in beta (mid January 2019) and 6 weeks afterwards in stable ~March 2019. By March 2019 LLVM 5.0 will be ~1.5 years old., and Rust master will be using LLVM 9@trunk.

This is a requirement for people supporting LLVM forks (e.g. custom targets) to move at a quite speedy fashion.

cc @kripken (emscripten) and @dylanmckay @shepmaster (avr-rust) - it would be great if you could share your thoughts on these issues.

@shepmaster
Copy link
Member

shepmaster commented Nov 10, 2018

avr-rust

We recently upgraded to LLVM 8 (based on 3480ac2) thanks to @TimNN, so I don't believe we are a concern here.

  • The baseline requirement is that all patches going into the fork must be reviewed and committed upstream first.

This has been the AVR fork's intention as well — we try to only have LLVM patches that are already in LLVM master, or at least open for review to be merged.

@cuviper
Copy link
Member

cuviper commented Nov 10, 2018

  • is it possible at all for stakeholders to move to LLVM 7 now ? If not, why not?

As you mentioned, Fedora 28 is still on LLVM 6, and it's non-trivial to upgrade the main LLVM package for the distro. And now that 29 is out, we'll be trying even harder not to rock the boat on 28, as many people use release-1 as a more conservative (stable) Fedora choice.

If hard-pressed, I could add an llvm7 compat package, leaving the main one alone -- but that's not usually done for newer versions, and would present new difficulties for system upgrades. I could also build with the bundled LLVM if really necessary.

  • do you think that a policy of supporting the last LLVM version (7 right now) is feasible?

Latest 2 LLVM versions would be better. For Fedora, this lines up nicely since we also release every 6 months and support the latest 2. (Although we actually support 3 for a window of about a month -- e.g. Fedora 27 isn't quite EOL yet.)

It would be even better if you wait for the stable patch release, giving more time for new issues to get worked out. We haven't even seen 7.0.1 yet, but that's in RC now. Ideally, this time until the patch release is a good time for new Rust backports on LLVM X.0 to also be suggested for the official LLVM X.0.1 release. I do try to work with @tstellar already to make that happen.

but by ~February 2019 Rust will be targeting LLVM9 already which is released in August 2019.

By March 2019 LLVM 5.0 will be ~1.5 years old., and Rust master will be using LLVM 9@trunk.

I don't think Rust should make a habit of jumping onto the latest trunk. I understand this was done currently for some WASM fixes, but this should be an exceptional case. Even right now, what we're calling "LLVM 8" is just a snapshot that's actually closer to 7 -- I count ~1200 commits past release_70, but trunk is now more than ~2800 commits beyond rust-llvm! I plan to at least rebase that when the new LLVM monorepo is officially ready for use.

It's well and good to make a best effort to support building with trunk, so we're ready for new releases sooner, but in general I think we should wait for the actual release before we move.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 10, 2018

I could also build with the bundled LLVM if really necessary.

@cuviper Could you mention why is it worth it to avoid the bundled LLVM ? Other distro packagers mentioned in the internal threads that they have decided to always use the bundled LLVM anyways.

I don't think Rust should make a habit of jumping onto the latest trunk.

IIRC LLVM recommends projects that depend on it but are hosted outside their main repo to follow trunk as closely as possible because its C++ API does not guarantee any kind of backwards compatibility and this allows new issues to be catched with enough time to fix them before each release.

It's well and good to make a best effort to support building with trunk, so we're ready for new releases sooner, but in general I think we should wait for the actual release before we move.

If we decide to go this route, it might be worth it to add a build bot that attempts to build rustc with LLVM trunk on some tier 1 targets (e.g. x86_64-apple-darwin and x86_64-unknown-linux-gnu).

@cuviper
Copy link
Member

cuviper commented Nov 10, 2018

@cuviper Could you mention why is it worth it to avoid the bundled LLVM ?

It's a general policy: https://fedoraproject.org/wiki/Bundled_Libraries

And just as a practical matter, it really helps build times to not have to build LLVM too. We don't cache any artifacts between builds like Rust's CI does, and armv7hl in particular is already painfully long, over 5 hours for build and check.

Other distro packagers mentioned in the internal threads that they have decided to always use the bundled LLVM anyways.

I read it that they've resigned to using the bundled LLVM, not that this would be preferred.

IIRC LLVM recommends projects that depend on it but are hosted outside their main repo to follow trunk as closely as possible because its C++ API does not guarantee any kind of backwards compatibility and this allows new issues to be catched with enough time to fix them before each release.

It's a mixed bag, because this also means that fewer people would be testing the release. @tstellar had a talk at LLVM-Dev 2017 advocating more people use stable versions. Even still, we're not actually following trunk closely, as I pointed out how far behind we are right now.

We can still give that upstream benefit of testing pre-releases of LLVM before it gets out the door, but I don't think we should be releasing Rust based on unreleased LLVM.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 10, 2018

Thank you, all of that makes sense!

We can still give that upstream benefit of testing pre-releases of LLVM before it gets out the door, but I don't think we should be releasing Rust based on unreleased LLVM.

To implement this in a useful way we would have to stop making rustc require pre-release LLVM versions to work properly.

@djc
Copy link
Contributor

djc commented Nov 10, 2018

So, as a Gentoo packager, here's my take:

  • In terms of support window, it would be nice to be able to support previous major version in addition to current major version, just so that we can provide a stable version to our users. System packages like LLVM can take a while to bake in our stable tree, so longer support would be nice. We definitely don't have a need for LLVM 5, though.

  • On the other hand, I'm actually more interested in specific and explicit information on what a given Rust release was actually tested with in terms of LLVM backend. Ideally this would take the form of something like LLVM 7, but with patch/commit X for miscompilation bug P, patch Y for bug Q, patch Z for bug R. In the end, I do believe "what hasn't been tested doesn't work", which I think is also the point @glandium was trying to make in the irlo thread.

  • We might be able to carry some LLVM patches in our packages, especially if they have been committed upstream. However, something like the register allocator fix sounds like a potentially hairy thing to include for all of our users.

  • Why we like to avoid bundled LLVM: allows us to centralized QA on LLVM-based packages in our tree, plus for Gentoo the added compile time is really a pain. Since Rust releases relatively frequently, this means that every Gentoo users building the default Rust packages spends a lot of time rebuilding the bundled LLVM right now. I resigned to using the bundled LLVM because I don't want the burden of dealing with miscompilation bugs from using a subtly-different standard LLVM release, but this is definitely suboptimal and frowned upon by other Gentoo developers, too.

It's well and good to make a best effort to support building with trunk, so we're ready for new releases sooner, but in general I think we should wait for the actual release before we move.

I very much support this line of thinking.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 11, 2018

In terms of support window, it would be nice to be able to support previous major version in addition to current major version, just so that we can provide a stable version to our users.

That is, if currently Rust is using LLVM8@trunk, would LLVM7 be enough? Or would you rather have LLVM6 ?

On the other hand, I'm actually more interested in specific and explicit information on what a given Rust release was actually tested with in terms of LLVM backend.

Would it help if, e.g., the release notes would contain the LLVM version + commit of the bundled LLVM used for stable Rust releases? (maybe with a link to the branch uses by rust's bundled LLVM fork?)

I resigned to using the bundled LLVM because I don't want the burden of dealing with miscompilation bugs from using a subtly-different standard LLVM release, but this is definitely suboptimal and frowned upon by other Gentoo developers, too.

@cuviper had the same request and this is a pretty hard constraint. To expand on this:

  • some Rust features require newer LLVM features - these features could not be implemented until the LLVM features hit a stable release, this is bad because newer LLVM features are often buggy, and feedback from users is often able to catch bugs before a release - the LLVM RC period is not enough for this.
  • some Rust features use experimental LLVM APIs - these features could never be stabilized because these experimental APIs are not guaranteed to exist across releases, or be remotely similar (they might change semantics so that using a different LLVM version "does something different") - we'll need a policy that enforces that none of these can land on stable.
  • some bugs could not be fixed easily - LLVM has bugs, and for Rust master, the easiest way to solve a bug is often to just require the LLVM commit that has the fix or fixes - sometimes these are easy to backport, sometimes they aren't.

Any solution would have to make things work for distros, without making anything worse for those using the bundled LLVM.

A "compromise" might be to use LLVM@trunk on nightly, and to also test beta thoroughly with the minimum supported LLVM version (on all targets). This gives us 6 weeks to error properly on everything that requires the bundled LLVM or to try to provide a backwards compatible workarounds. But 6 weeks is not a long time and the older the minimum released LLVM version is, the higher the chances that Rust users on stable that are not using the bundled LLVM will just see an "error: your system's llvm version is too old"-type of error message.

@glandium
Copy link
Contributor

Would it help if, e.g., the release notes would contain the LLVM version + commit of the bundled LLVM used for stable Rust releases? (maybe with a link to the branch uses by rust's bundled LLVM fork?)

This reminds me... rustc --version --verbose prints the plain LLVM version. That is, current nightly says: 8.0. That is essentially useless information, since this is not 8.0 at all.

@cuviper
Copy link
Member

cuviper commented Nov 12, 2018

FYI, #55835 is updating to a newer trunk snapshot.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 12, 2018

FYI, to put that in context, there are people collaborating to specify 128-bit SIMD for WASM, implement that in LLVM, and exposing that from Rust. This is iterative work that requires keeping the spec, llvm, and Rust, in sync. And this is not the only feature that requires this kind of synchronization.

So rust-lang/master following LLVM trunk is pretty much a hard requirement for progress in some fronts right now.

As long as these features do not percolate into stable, this does not imply that Rust stable releases have to require LLVM trunk as well. I believe we can find a solution that works for all parties involved.

@djc
Copy link
Contributor

djc commented Nov 14, 2018

That is, if currently Rust is using LLVM8@trunk, would LLVM7 be enough? Or would you rather have LLVM6 ?

I was talking about having LLVM 6. But to some extent, that might be a longer-term desire. It's much more important to me that we get to use (something close to) an actual LLVM release for stable Rust builds.

Would it help if, e.g., the release notes would contain the LLVM version + commit of the bundled LLVM used for stable Rust releases? (maybe with a link to the branch uses by rust's bundled LLVM fork?)

For stable Rust, it would still be disappointing if we had to pull a "random" LLVM commit from upstream. For nightly Rust (which we don't package yet), that might be acceptable. For stable Rust, it would be better if there was something like "this released version + these upstream commits targeting these particular bugs", as I outlined in my previous comment. That would allow us to weight cost/benefit for each of the extra patches separately (for example, some of them might affect Windows only, which for Gentoo we wouldn't care about so much).

A "compromise" might be to use LLVM@trunk on nightly, and to also test beta thoroughly with the minimum supported LLVM version (on all targets). This gives us 6 weeks to error properly on everything that requires the bundled LLVM or to try to provide a backwards compatible workarounds. But 6 weeks is not a long time and the older the minimum released LLVM version is, the higher the chances that Rust users on stable that are not using the bundled LLVM will just see an "error: your system's llvm version is too old"-type of error message.

Testing with a released version of LLVM on the beta branch sounds like a potentially big improvement over what we have now, from my perspective. IMO that's a worthy goal even if it is the very latest LLVM released ever at the time.

@hanna-kruppe
Copy link
Contributor

hanna-kruppe commented Nov 14, 2018

I'm not super involved in these matters but my impression from the issues I see filed against Rust and later categorized as LLVM bugs is that a lot of issues are not caught by our existing tests when we upgrade LLVM but rather found in the wild by end users. So I'm scared that shipping nightlies with bleeding edge LLVM and stable with an older LLVM would just lead to taking longer to notice issues with said older LLVM and to stable releases being less reliable. In theory there's the beta period, but the bugs already sneaking into stable today indicate that beta is already not tested enough, so relying on it to catch even more (and often very subtle) issues is a scary prospect to me.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 15, 2018

So I'm scared that shipping nightlies with bleeding edge LLVM and stable with an older LLVM

I wasn't suggesting this. I was suggesting that beta could also be tested with the minimum LLVM version that we support.

Some distros are already shipping stable Rust releases that do not use the bundled LLVM, they are using this to compile code that they are also shipping to their users, and I suspect that no distro is testing this properly.

Reducing the minimum supported LLVM version that's 1-2 releases old is an improvement. Running some more tests on beta using the minimum supported LLVM version would be an improvement as well.

Are these changes enough to make Rust toolchains that use the system LLVM reliable ? No, but using the system LLVM is an use case that we currently do not block, and I don't think this is the place to start a discussion about this.


It appears that bumpting the minimum supported LLVM version to 6.0.1. has some consensus. I'll try to get to it this week and will ping the packagers I know there so that you can give the PR a try (there should really be a @rust-lang/packagers or similar group to make this easier, I voiced this in the community discord channel and the community team appeared to agree).

@hanna-kruppe
Copy link
Contributor

I already addressed that beta would also be tested, and why I don't think that's good enough. It's true that it would still be an improvement for distros that already ship a rustc using an old LLVM release, but

  1. IMO that could be better addressed otherwise, e.g. by giving guidance on which backports are necessary to fix which bugs as suggested by @djc
  2. it regresses the Rust project's own releases installed via rustup, which is a significant fraction of the user base

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 15, 2018

it regresses the Rust project's own releases installed via rustup, which is a significant fraction of the user base

Why ? rustup would still ship Rust's using the bundled LLVM - I was not suggesting otherwise.

@hanna-kruppe
Copy link
Contributor

Ok then I must have misunderstood. If we don't ship rustcs compiled against old LLVM releases to users, then how do you propose we test them more exhaustively than we already do? Where do we get those extra test cases? We run in-tree tests with an old LLVM on CI and crater persumably already ran back when we first upgraded our bundled LLVM to approximately the release that is now our lower bound.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 15, 2018

how do you propose we test them more exhaustively than we already do? Where do we get those extra test cases? We run in-tree tests with an old LLVM on CI and crater persumably already ran back when we first upgraded our bundled LLVM

We currently only have one build bot (x86_64-unknown-linux-gnu) using the minimum LLVM version. That's all the testing that we do with it AFAIK.

There are also a lot of dependencies that rust-lang/rust assumes to work correctly (libc, stdsimd, jemalloc-sys, rayon, miri, chalk, clippy, rustfmt, etc.). None of these is tested against the minimum LLVM AFAIK (not by us, not by the distros themselves).

So adding more build bots to beta that test a couple of more platforms with the system's llvm, and that also run tests for these components using the system LLVM, would be a way to make rust toolchains using the system llvm more reliable.

In any case, there seems to be consensus that bumping the minimum LLVM to version 6.0.1 is "ok", so I'll try to do that in the next days. I don't think that we did a crater run last time that we updated this, and I don't even know if we can do crater runs using the system LLVM, but I will ask about this.

@dwightguth
Copy link

For what it's worth I would like to jump in and say that I've run into a number of problems relating to rust's llvm bitcode not being compatible with the version of llvm it purports to be shipping, presumably because of these upstream patches. This creates serious difficulties for those of us who are trying to integrate rust code into projects written in multiple llvm languages. It would be a huge benefit to the project I'm working on if it were possible for there to be a release of rust that doesn't include patches that break the format of llvm bitcode.

@nikic
Copy link
Contributor

nikic commented Nov 29, 2018

@dwightguth None of the LLVM patches used by Rust should be introducing bitcode incompatibilities. Quite likely something else is at fault there. Could you maybe open a separate issue about this with the incompatibilities you're seeing and the LLVM versions involved?

@cuviper
Copy link
Member

cuviper commented Nov 29, 2018

rust's llvm bitcode not being compatible with the version of llvm it purports to be shipping, presumably because of these upstream patches.

This may also be because rust-llvm is not always a true LLVM release. What we're calling LLVM 8 right now is really just a snapshot from trunk.

@glandium
Copy link
Contributor

For what it's worth I would like to jump in and say that I've run into a number of problems relating to rust's llvm bitcode not being compatible with the version of llvm it purports to be shipping, presumably because of these upstream patches. This creates serious difficulties for those of us who are trying to integrate rust code into projects written in multiple llvm languages. It would be a huge benefit to the project I'm working on if it were possible for there to be a release of rust that doesn't include patches that break the format of llvm bitcode.

See #55842 (comment)

@nikic
Copy link
Contributor

nikic commented Nov 30, 2018

@dwightguth If you're interoperating with clang in particular, #56371 will probably help your use case, once implemented.

@bstrie
Copy link
Contributor

bstrie commented Nov 30, 2018

For reference, does Clang have a policy of supporting older versions of LLVM? Or does each Clang release pin to a specific version of LLVM, and if you have an old LLVM version you just use an older Clang? I suppose it's quite easy to believe that infrequent compiler updates are more tolerable in C++ than in Rust.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 30, 2018 via email

@dylanmckay
Copy link
Contributor

From the LLVM Developer Policy on IR backwards compatibility

The textual format is not backwards compatible. We don’t change it too often, but there are no specific promises.

  • The current LLVM version supports loading any bitcode since version 3.0.
  • Newer releases can ignore features from older releases, but they cannot miscompile them. For example, if nsw is ever replaced with something else, dropping it would be a valid way to upgrade the IR.

To summarise, a binary bitcode file *.bc, compiled with LLVM 3.0 (which was tagged 7 years ago) is guaranteed to be backward compatible with any LLVM version since.

The textual representation of that same LLVM IR, a *.ll file, can and does change in backwards incompatible ways. This means that an LLVM IR file compiled with LLVM is only guaranteed to be compatible with .

I had a quick look at the rust-lang/llvm top of tree. None of the Rust-specific patches touch the BitcoderReader.cpp or BitcodeWriter.cpp, where most of the potential breaking changes would be isolated. Most of the changes are related to Rust specific IR transformations that after a bitcode file is generated, hacks get the buildbot working, and exposing more information to Rust from LLVM to improve compiler diagnostic messages.

@dylanmckay
Copy link
Contributor

For reference, does Clang have a policy of supporting older versions of LLVM? Or does each Clang release pin to a specific version of LLVM, and if you have an old LLVM version you just use an older Clang? I suppose it's quite easy to believe that infrequent compiler updates are more tolerable in C++ than in Rust.

Clang is part of LLVM, it’s in the same repository, they are part of the same binary release.

This is true to the point that even llvm and clang repositories that are lagging only a handful of commits (i.e. a few days of work on upstream LLVM trunk) from one another will often fail to compile together. The two projects are very coupled.

@Ericson2314
Copy link
Contributor

Ericson2314 commented Dec 9, 2018

It sounds like best way to proceed is to vastly expand CI coverage, and use Cargo features to disable things (usually language features) based on LLVM version. This sucks, but makes clear the actually costs of supporting multiple versions rather than keeping it with allowed test failures and missing CI combinations.

Also, as a contributor to NixOS/Nixpkgs, most distributions in supporting supporting only 1 version of things (and a stable-1 version at that) seems awfully conservative. I get that Rust is constrained by the popularity-contest-winning/incumbent distros, but just wanted to pipe up that distributions don't always be the enemy of agility. Now that everything isn't barely tested C, we don't need to be so skiddish, or can at least offer users options to choose from given their own risk tolerance.

FWIW My skin in the game is hoping to see #52694 fixed, so we can proceed on allocator polymorphism. Gating an unstable library feature on the LLVM version (perhaps indirectly via a language feature), is a perfect easy and sound workaround that allows exploration without picking a fight with the min version, but it's only possible once the infrastructure for such a thing is in place.

CC @glandium

@nikic
Copy link
Contributor

nikic commented Dec 9, 2018

Based on the discussion here, I get the impression that, while nobody is really happy with the current LLVM situation, there is agreement that we can drop support for LLVM 5, so I went ahead and opened a PR for that at #56642. I believe this should at least unblock further work on allocators.

@nikic nikic added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Dec 9, 2018
@glandium
Copy link
Contributor

I believe this should at least unblock further work on allocators.

FWIW, it won't. Unpatched llvm version 6 still has the problem from issue #52694, and the version of llvm 6 in Ubuntu before 18.10 isn't patched for that issue (the one in Ubuntu 18.10 is, though).

bors added a commit that referenced this issue Dec 16, 2018
Bump minimum required LLVM version to 6.0

Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that.

I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch.

r? @alexcrichton
bors added a commit that referenced this issue Dec 17, 2018
Bump minimum required LLVM version to 6.0

Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that.

I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch.

r? @alexcrichton
@alexcrichton
Copy link
Member

This issue, as titled, is done now in #56642, so I'm going to close it. If there's follow-up work though it'd be good to open new issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
Projects
None yet
Development

No branches or pull requests