Closed
Description
... 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.