[llvm-dev] Switching to Ninja

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 9 08:00:28 PDT 2020


You are correct, sir. Everything works much better if I run CMake and Ninja from a "developer command prompt." I displayed the path and almost fell off my chair laughing. The road to hell is paved with environment variable entries.

Two questions.

1. Building with Visual Studio created build/release/bin. Building with Ninja created build/bin (no release directory). Does that make sense? (I have -DCMAKE_BUILD_TYPE=Release on the cmake command.)

2. The first build attempt failed because the existing TableGen Language Reference has multiple instances of the production 'SimpleValue', which produces warnings from Sphinx. I fixed that by adding -DSPHINX_WARNINGS_AS_ERRORS:BOOL=OFF to the cmake command. Does the official build do that, too? I searched all the CMakeLists files but didn't find any use of that option.


At 8/8/2020 09:48 PM, David Blaikie wrote:
>On Sat, Aug 8, 2020 at 5:27 PM Paul C. Anagnostopoulos
><paul at windfall.com> wrote:
>>
>> Sigh. I ask for your indulgence yet again.
>>
>> I installed Ninja and deleted my old build tree. When I run CMake now, I'm told that it can't find the compilers and assembler. So, of course, I need to put a compiler toolset on my path. I tried MinGW but was instantly reminded that it doesn't have localtime_s. So I tried to find the Visual Studio binaries and located four different directories. I added what I thought was the correct one to my path. CMake found the compiler, but it failed to compile CMake's test.
>
>I /think/ you're probably best using a Visual Studio shell - I /think/
>you want to use a command prompt like this:
>https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
>that sets up everything right in the PATH.
>
>>
>> Is anyone running Ninja with Visual Studio who might have a suggestion? I can't find anything in "Building LLVM with CMake."  I've attached the CMake output below.



More information about the llvm-dev mailing list