I have built an LLVM cross compiler (targeting RISCV) using Visual Studio 2019 using this configuration command:
cmake -G “Visual Studio 16 2019” -DLLVM_ENABLE_PROJECTS=“clang;lld” -DLLVM_ENABLE_RUNTIMES=“libcxx;libcxxabi” -triple=riscv64-unknown-elf -A x64 -Thost=x64 …\llvm-project\llvm
The compiler and linker build fine, but I get preprocessor errors when the LLVM_ENABLE_RUNTIMES code tries to build. I suspect the build is trying to use the Visual Studio preprocessor. A bunch of errors are being generated for the #include_next directive.
Is their another configuration command (or something else) I need to tell it to use the clang tools to build the runtime libraries?
Thanks.