[llvm] Workaround -Wglobal-constructor warning. (PR #94699)
Eric Schweitz via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 08:04:10 PDT 2024
schweitzpgi wrote:
Here's the evidence/snippage that the warning/error actually can be triggered in our environ.
```console
$ make
[ 0%] Built target LLVMDemangle
[ 0%] Built target LLVMSupportBlake3
Consolidate compiler generated dependencies of target LLVMSupport
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.o
/home/eric/tpls/llvm/llvm/lib/Support/CodeGenCoverage.cpp:24:30: error: declaration requires a global destructor [-Werror,-Wglobal-constructors]
static sys::SmartMutex<true> OutputMutex;
^
1 error generated.
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/build.make:426: lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:20373: lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
```
https://github.com/llvm/llvm-project/pull/94699
More information about the llvm-commits
mailing list