Skip to content

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

@TimNN

Description

@TimNN
Contributor

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

Activity

added
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
on Nov 4, 2022
TimNN

TimNN commented on Nov 4, 2022

@TimNN
ContributorAuthor

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

nikic

nikic commented on Nov 4, 2022

@nikic
Contributor

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.

added a commit that references this issue on Nov 4, 2022
f6ca5aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @nikic@TimNN

    Issue actions

      [LLVM HEAD] Build fails due to memory attribute changes · Issue #103961 · rust-lang/rust