I built my first submission with Visual Studio, but everything I read and watch suggests Ninja, about which I know nothing. Is it okay if I rerun CMake with -G "Ninja" in the same build directory, then just run ninja?
Maybe? I'd usually delete my whole build directory (or create another) if I were switching that aspect - not sure if they'd effectively be able to reuse each others artefacts or would get in the way, etc. On Sat, Aug 8, 2020 at 2:12 PM Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > I built my first submission with Visual Studio, but everything I read and watch suggests Ninja, about which I know nothing. Is it okay if I rerun CMake with -G "Ninja" in the same build directory, then just run ninja? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Ninja is really good, indeed. The only problem I've seen is that LLVM linking step (made massively parallel by Ninja) renders the 8GB RAM system unresponsive due to excessive swapping. You can reconfigure CMake to use Ninja in an existing build folder, but it will not use the binaries previously built with another tool. Moreover, generated files may clash in an incompatible way, so it's rather better to cleanup the old build. Kind regards, - Dmitry. сб, 8 авг. 2020 г. в 23:12, Paul C. Anagnostopoulos via llvm-dev < llvm-dev at lists.llvm.org>:> I built my first submission with Visual Studio, but everything I read and > watch suggests Ninja, about which I know nothing. Is it okay if I rerun > CMake with -G "Ninja" in the same build directory, then just run ninja? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200808/73884d99/attachment.html>
I will delete the build directory and start fresh. Thanks! At 8/8/2020 05:19 PM, David Blaikie wrote:>Maybe? I'd usually delete my whole build directory (or create another) >if I were switching that aspect - not sure if they'd effectively be >able to reuse each others artefacts or would get in the way, etc.
On Sat, Aug 8, 2020 at 2:22 PM Dmitry Mikushin via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Ninja is really good, indeed. The only problem I've seen is that LLVM linking step (made massively parallel by Ninja) renders the 8GB RAM system unresponsive due to excessive swapping.FWIW, there is a way to limit the number of parallel link jobs in particular (so compile jobs can still have more parallelism). I don't recall exactly what it is - I guess some CMake variable.> You can reconfigure CMake to use Ninja in an existing build folder, but it will not use the binaries previously built with another tool. Moreover, generated files may clash in an incompatible way, so it's rather better to cleanup the old build. > > Kind regards, > - Dmitry. > > сб, 8 авг. 2020 г. в 23:12, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org>: >> >> I built my first submission with Visual Studio, but everything I read and watch suggests Ninja, about which I know nothing. Is it okay if I rerun CMake with -G "Ninja" in the same build directory, then just run ninja? >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
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. 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. At 8/8/2020 05:19 PM, David Blaikie wrote:>Maybe? I'd usually delete my whole build directory (or create another) >if I were switching that aspect - not sure if they'd effectively be >able to reuse each others artefacts or would get in the way, etc. > >On Sat, Aug 8, 2020 at 2:12 PM Paul C. Anagnostopoulos via llvm-dev ><llvm-dev at lists.llvm.org> wrote: >> >> I built my first submission with Visual Studio, but everything I read and watch suggests Ninja, about which I know nothing. Is it okay if I rerun CMake with -G "Ninja" in the same build directory, then just run ninja?---------------------------------------------- -- The C compiler identification is MSVC 19.26.28806.0 -- The CXX compiler identification is MSVC 19.26.28806.0 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Host x64/x64/cl.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.2 8801/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.2 8801/bin/Hostx64/x64/cl.exe - broken CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/LLVM/Build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Utils/ninja.exe cmTC_009c0 && [1/2] Building C object CMakeFiles\cmTC_009c0.dir\testCCom piler.c.obj [2/2] Linking C executable cmTC_009c0.exe FAILED: cmTC_009c0.exe cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_009c0.dir --r c=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\ x64\link.exe /nologo CMakeFiles\cmTC_009c0.dir\testCCompiler.c.obj /out:cmTC_009c0.exe /implib:cmTC_009c0.lib /pdb: cmTC_009c0.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1: command "rc /fo CMakeFiles\cmTC_009c0.dir/manifest.res CMakeFiles\cmTC_009c0.dir/manifest.rc" failed (exit code 0) with the following output: The system cannot find the file specified ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:49 (project) -- Configuring incomplete, errors occurred! See also "D:/LLVM/Build/CMakeFiles/CMakeOutput.log". See also "D:/LLVM/Build/CMakeFiles/CMakeError.log".