Build LLVM Windows


(chandrasekar B R) #1

Hi,
I am getting following errors while building RISCV LLVM on windows 10 .
I am taking reference from below link for building LLVM for riscv target .


Please help me out with these errors.
C:/riscv/riscv-llvm/llvm/include/llvm/Support/Errc.h:66:23: error: ‘not_supported’ is not a member of 'std::errc’
not_supported = int(std::errc::not_supported),
^~~
C:/riscv/riscv-llvm/llvm/lib/Support/ErrorHandling.cpp:60:13: error: ‘mutex’ in namespace ‘std’ does not name a type
static std::mutex ErrorHandlerMutex;
^~~~~
C:/riscv/riscv-llvm/llvm/lib/Support/ErrorHandling.cpp:61:13: error: ‘mutex’ in namespace ‘std’ does not name a type
static std::mutex BadAllocErrorHandlerMutex;

Thank you


(Bruce Hoult) #2

Let’s just look at your first error for now.

The RISC-V project has not modified this file. “not_supported” was added to the standard LLVM master by the following commit:

Please ensure that you can build LLVM without RISC-V modifications before you build it with our patches. If you have problems with that you should ask for help on the LLVM forums.

It’s just a guess, but you probably have too old a version of your compiler (MSVC?)

https://llvm.org/docs/GettingStartedVS.html

“You will need Visual Studio 2015 or higher, with the latest Update installed.”