Dennis Luehring via llvm-dev
2018-Sep-22 05:11 UTC
[llvm-dev] can't build/run after adding lib to Fibonacci example, even reverting the complete llvm tree does not help
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 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 >Otherwise, there might be some workarounds. E.g. Unload the >"ZERO_CHECK" project from the IDE so it does not reconfigure (or just >run cmake from outside the IDE before building). >Or start the IDE from >the Developer Command Prompt so the right environment variables are >set. will check that later - it just costs me way too much time to get to this point (Fibonacci from outside, finish build of solution inside IDE), currently nearly 2 hours :( beside "i don't really know what im doing" and the short swapping problem the workflow/build optimization of the CMake scripts feels strange, not very optimal is that a windows/VStudio generator only effect (and no one is using that, or everyone got more cores/RAM?) or how does this usually work? other CMake based projects do not behave like this on my system as a side note: i also got VS2010 and VS2015 installed on my build system Am 21.09.2018 um 19:20 schrieb Michael Kruse:> I might try compiling your source from the VS's Developer Command Prompt: > > cmake --build . --target Fibonacci > > Does this work? > > Otherwise, there might be some workarounds. E.g. Unload the > "ZERO_CHECK" project from the IDE so it does not reconfigure (or just > run cmake from outside the IDE before building). Or start the IDE from > the Developer Command Prompt so the right environment variables are > set. > > Michael
Michael Kruse via llvm-dev
2018-Sep-24 05:27 UTC
[llvm-dev] can't build/run after adding lib to Fibonacci example, even reverting the complete llvm tree does not help
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 enoughNo 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 enoughYou may want to restrict the number of parallel project builds: Options->Projects and Solutions->Build and Run->maximum number of parallel build jobs Michael
Dennis Luehring via llvm-dev
2018-Sep-24 15:31 UTC
[llvm-dev] can't build/run after adding lib to Fibonacci example, even reverting the complete llvm tree does not help
>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.i' will your other suggestions (with starting VStudio from commandline with VCVars set) if that helps>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.i'll give that a try>You may want to restrict the number of parallel project builds: >Options->Projects and Solutions->Build and Run->maximum number of >parallel build jobshope the build time will not raise again by a large margine using just 1 of my cores thx Am 24.09.2018 um 07:27 schrieb Michael Kruse:> 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