[llvm-dev] can't build/run after adding lib to Fibonacci example, even reverting the complete llvm tree does not help

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 23 22:27:23 PDT 2018


Am Sa., 22. Sep. 2018 um 00:12 Uhr schrieb Dennis Luehring via
llvm-dev <llvm-dev at lists.llvm.org>:
>
> first: thank you for helping out
>
>  >I might try compiling your source from the VS's Developer Command Prompt:
>  >cmake --build . --target Fibonacci
>  >Does this work?
>
> call "C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
> cd llvm-build
> cmake --build . --config Debug --target Fibonacci
>
> building Fibonacci example works BUT X86CommonTableGen get rebuild again?
>
> Das Projekt
> "D:\projects\fun\jit_tests\clang_from_src\llvm-build\lib\Target\X86\InstPrinter\LLVMX86AsmPrinter.vcxproj"
> (37) erstellt
> "D:\projects\fun\jit_tests\clang_from_src\llvm-build\lib\Target\X86\X86CommonTableGen.vcxproj"
> (38) auf Knoten "1" (Standardziele).
> InitializeBuildStatus:
> "x64\Debug\X86CommonTableGen\X86Commo.1917F16D.tlog\unsuccessfulbuild"
> wird erstellt, da "AlwaysCreate" angegeben wurde.
> CustomBuild:
>    Building X86GenAsmMatcher.inc...
>    Building X86GenAsmWriter.inc...
>    Building X86GenAsmWriter1.inc...
>    Building X86GenCallingConv.inc...
>    Building X86GenDAGISel.inc...
>    Building X86GenDisassemblerTables.inc...
>    Building X86GenEVEX2VEXTables.inc...
>    Building X86GenFastISel.inc...
>    Building X86GenGlobalISel.inc...
>    ...
> which costs me much time (>30min) on my slow system - and i don't
> understand why "AlwaysCreate" is used here - i only added one lib
> dependencie to an example and reverted it? now the totaly unrelated big
> one is build again
> it could be that faster systems do not suffer that much from this
> behavior but it still does not feel right
>
> enough RAM, no swapping, just my 2 core CPU is not fast enough

No idea either why it re-reruns, but it should not be that much of an
issue and not re-run when you rebuild without changes to CMakeLists.
The debug version of tablegen is quite slow. You can either set
LLVM_TABLEGEN/CLANG_TABLEGEN to separately compiled release version of
them or use LLVM_OPTIMIZED_TABLEGEN which does that for you.



> result: Fibonacci was built without errors
>
> after building i reopened llvm-build\LLVM.sln in VS2017 ... loading 273
> projects
> and tested what happend on selecting "build solution" - to check what
> else happened to build now
> serveral cpp getting compiled, libs/exes getting linked - i think that
> is related to the X86CommonTableGen rebuild
> another >30min waiting to "finish building" the solution inside of the IDE
>
> nearly enough RAM, started swapping on building lli.cpp :(, but get back
> to under 5GB Ram usage after some seconds, my 2 core CPU is still not
> fast enough

You may want to restrict the number of parallel project builds:
Options->Projects and Solutions->Build and Run->maximum number of
parallel build jobs

Michael


More information about the llvm-dev mailing list