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

[LLVM HEAD] Build fails due to memory attribute changes #103961

Closed
TimNN opened this issue Nov 4, 2022 · 2 comments · Fixed by #103977
Closed

[LLVM HEAD] Build fails due to memory attribute changes #103961

TimNN opened this issue Nov 4, 2022 · 2 comments · Fixed by #103977
Assignees
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Comments

@TimNN
Copy link
Contributor

TimNN commented Nov 4, 2022

Building the compiler fails at LLVM head due to the changes introduced by llvm/llvm-project@304f1d5 ("[IR] Switch everything to use memory attribute"):

cargo:warning=llvm-wrapper/RustWrapper.cpp:217:12: error: no member named 'InaccessibleMemOnly' in 'llvm::Attribute'; did you mean simply 'InaccessibleMemOnly'?
--
  | cargo:warning=    return Attribute::InaccessibleMemOnly;
  | cargo:warning=           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | cargo:warning=           InaccessibleMemOnly

Based on my (limited) understanding the fix will not be entirely trivial, so opening an issue to track.

Found via our experimental rust + llvm at HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/14694#01844218-71d4-4b0c-85a3-bf643a088de1

cc @nikic

@nikic nikic added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Nov 4, 2022
@TimNN
Copy link
Contributor Author

TimNN commented Nov 4, 2022

I'll give fixing this a go. @rustbot claim

@nikic
Copy link
Contributor

nikic commented Nov 4, 2022

I expect the path of least resistance here would be to export two new functions from our FFI API to create the readonly and inaccessiblememonly attributes. Exposing MemoryEffects to the Rust side is likely not worthwhile at this point.

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

Successfully merging a pull request may close this issue.

2 participants