Skip to content

LLVM: rustllvm produces unsilenceable warnings on new versions of GCC (9.2.0) #69078

Closed

Description

@petrochenkov

... which are pretty annoying.
It probably wouldn't be a problem if Cargo didn't cache the warnings and didn't display them on every build, even if rustllvm isn't actually built.

Example of the warnings:

warning: In file included from ../rustllvm/rustllvm.h:4,
warning:                  from ../rustllvm/PassWrapper.cpp:6:
warning: C:/msys64/home/we/rust/src/llvm-project/llvm/include/llvm/ADT/ArrayRef.h: In instantiation of 'llvm::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long long unsigned int]':
warning: C:/msys64/home/we/rust/src/llvm-project/llvm/include/llvm/IR/DIBuilder.h:644:74:   required from here
warning: C:/msys64/home/we/rust/src/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:101:37: warning: initializing 'llvm::ArrayRef<long long unsigned int>::Data' from 'std::initializer_list<long long unsigned int>::begin' does not extend the lifetime of the underlying array [-Winit-list-lifetime]
warning:   101 |     : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),

This is fixed in LLVM upstream (llvm/llvm-project@6c2151b), so that commit can be cherry-picked into our LLVM fork.

The commit seems to be included into LLVM 10, but I'm not sure when #67759 will be able to land.

Activity

  1. added
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    on Feb 11, 2020
  2. Mark-Simulacrum commented on Feb 11, 2020

    @Mark-Simulacrum
    Member

    We might want to hide the LLVM/rustllvm build log from users -- similar to how Cargo hides upstream, non-local, path deps. We'd probably want to stick this behind an option or something like that for those who are compiling LLVM after changing it locally.

  3. added a commit that references this issue on Feb 25, 2020
  4. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 26, 2020
  5. added a commit that references this issue on Feb 26, 2020
  6. added a commit that references this issue on Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions