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

First round of LLVM 6.0.0 compatibility #47710

Merged
merged 7 commits into from
Jan 26, 2018

Conversation

alexcrichton
Copy link
Member

This includes a number of commits for the first round of upgrading to LLVM 6. There are still lingering bugs but I believe all of this will nonetheless be necessary!

LLVM has since removed the `CodeModel::Default` enum value in favor of an
`Optional` implementationg throughout LLVM. Let's mirror the same change in Rust
and update the various bindings we call accordingly.

Removed in llvm-mirror/llvm@9aafb854c
Just bog-standard compile error fixed by adding some new header files
Looks like they did some refactoring of flags in the backend and this should
catch us up! The "unsafe algebra" boolean has been split into a number of
boolean flags for various operations, and this updates to use the `setFast`
function which should hopefully have the same behavior as before.

This was updated in llvm-mirror/llvm@00e900afd
It looks like LLVM also removed it in llvm-mirror/llvm@f45adc29d in favor of the
name "GNU64". This was added in the thought that we'd need such a variant when
adding mips64 support but we ended up not needing it! For now let's just
removing the various support on the Rust side of things.
Updated in llvm-mirror/llvm@203c90ba this function now just returns an `Error`,
so this updates the C++ bindings accordingly
The comment for why cloning exists doesn't actually apply for wasm today and
apparently cloning is causing subtle bugs in LLVM, so let's just avoid it
altogether. More specifically after we emit the assembly for the wasm target we
don't actually use the module again, so there's no need to keep both around.

This seemed to be causing some scary verifier assertions in LLVM which seemed to
be uncovered by presumably (?) buggy behavior. Let's just avoid it for now and
make the wasm target slightly more lean in the process.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2018
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jan 24, 2018

@bors r+

cc @nagisa @eddyb who may have opinions

@bors
Copy link
Contributor

bors commented Jan 24, 2018

📌 Commit cf5b520 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jan 24, 2018

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Jan 24, 2018

📌 Commit cf5b520 has been approved by nikomatsakis

Looks like the clang with 16.04 fails to compile LLVM 6, but it looks like clang
in 18.04 can indeed compile LLVM 6.
@alexcrichton
Copy link
Member Author

@bors: r=nikomatsakis

@bors
Copy link
Contributor

bors commented Jan 24, 2018

📌 Commit e9a6499 has been approved by nikomatsakis

@nikomatsakis nikomatsakis added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 25, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 25, 2018
…atsakis

First round of LLVM 6.0.0 compatibility

This includes a number of commits for the first round of upgrading to LLVM 6. There are still [lingering bugs](rust-lang#47683) but I believe all of this will nonetheless be necessary!
@kennytm
Copy link
Member

kennytm commented Jan 26, 2018

Is the llvm-emscripten submodule expected to be included? The comment in cd4b23e suggests not. There is also beb756f.

@alexcrichton
Copy link
Member Author

@bors: r-

nah that was accidentally. When including this in #47748 I've removed the submodule and if that doesn't land I'll update this PR

bors added a commit that referenced this pull request Jan 26, 2018
@bors bors merged commit e9a6499 into rust-lang:master Jan 26, 2018
@alexcrichton alexcrichton deleted the llvm-6-compat branch January 26, 2018 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants