parallel ninja build on Linux

Hello,

I have a problem with parallel build using “ninja” on Linux. It works for me on OS X, but when I’m building this way on Linux it hangs on linking.

I don’t think that I should wait anymore because my machine has the following processor “Intel(R) Core™ i7-2600 CPU @ 3.40GHz”

When I run it using “ninja -j 1” it works.

Any ideas?

Log:

$ ninja

[2303/2348] Linking CXX executable bin/opt^C
ninja: build stopped: interrupted by user.

^C
$ ^C
$ ^C
$
$ ninja

^C
hak1r@HEX:~/p/llvm/build_ninja$ ^C
hak1r@HEX:~/p/llvm/build_ninja$ ninja
[3/48] Linking CXX executable bin/lldb-server-3.7.0

^C
ninja: build stopped: interrupted by user.
$
$
$ ninja
[3/48] Linking CXX executable bin/lldb-server-3.7.0
^C^C
ninja: build stopped: interrupted by user.

$ ^C
$ ninja -v
[1/48] : && /usr/bin/c++ -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -g -Wl,-allow-shlib-undefined -Wl,--export-dynamic -Wl,-O3 tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -o bin/clang-3.7 lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMAnalysis.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipa.a lib/libLLVMipo.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a lib/libLLVMTransformUtils.a lib/libLLVMVectorize.a lib/libclangBasic.a lib/libclangDriver.a lib/libclangFrontend.a lib/libclangFrontendTool.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86Desc.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMX86Info.a lib/libLLVMAsmPrinter.a lib/libLLVMSelectionDAG.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMMCDisassembler.a lib/libLLVMAArch64Utils.a lib/libclangCodeGen.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMInstrumentation.a lib/libLLVMObjCARCOpts.a lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMProfileData.a lib/libLLVMObject.a lib/libLLVMBitWriter.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMipa.a lib/libLLVMAnalysis.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libLLVMBitReader.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangAnalysis.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :
[2/48] : && /usr/bin/c++ -fPIC -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -g -Wl,-z,defs -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,liblldb.so.3.7 -o lib/liblldb.so.3.7.0 tools/lldb/source/CMakeFiles/liblldb.dir/lldb.cpp.o tools/lldb/source/CMakeFiles/liblldb.dir/lldb-log.cpp.o tools/lldb/source/CMakeFiles/liblldb.dir/__/scripts/LLDBWrapPython.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBAddress.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBAttachInfo.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBBlock.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBBreakpoint.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBBreakpointLocation.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBBroadcaster.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBCommandInterpreter.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBCommandReturnObject.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBCommunication.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBCompileUnit.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBData.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBDebugger.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBDeclaration.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBError.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBEvent.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBExecutionContext.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBExpressionOptions.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBFileSpec.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBFileSpecList.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBFrame.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBFunction.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBHostOS.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBInstruction.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBInstructionList.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBLaunchInfo.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBLineEntry.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBListener.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBModule.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBModuleSpec.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBPlatform.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBProcess.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBQueue.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBQueueItem.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBSection.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBSourceManager.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBStream.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBStringList.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBSymbol.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBSymbolContext.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBSymbolContextList.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTarget.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBThread.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBThreadCollection.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBThreadPlan.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBType.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeCategory.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeEnumMember.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeFilter.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeFormat.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeNameSpecifier.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeSummary.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBTypeSynthetic.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBValue.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBValueList.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBVariablesOptions.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBWatchpoint.cpp.o tools/lldb/source/API/CMakeFiles/lldbAPI.dir/SBUnixSignals.cpp.o lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMInterpreter.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMCodeGen.a lib/libLLVMipo.a lib/libLLVMSelectionDAG.a lib/libLLVMBitReader.a lib/libLLVMMC.a lib/libLLVMMCJIT.a lib/libLLVMCore.a lib/libLLVMMCDisassembler.a lib/libLLVMExecutionEngine.a lib/libLLVMOption.a lib/libLLVMSupport.a -Wl,--start-group lib/liblldbBreakpoint.a lib/liblldbCommands.a lib/liblldbDataFormatters.a lib/liblldbHost.a lib/liblldbCore.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbUtility.a lib/liblldbPluginDisassemblerLLVM.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFileSymtab.a lib/liblldbPluginDynamicLoaderStatic.a lib/liblldbPluginDynamicLoaderPosixDYLD.a lib/liblldbPluginDynamicLoaderHexagonDYLD.a lib/liblldbPluginObjectFileELF.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginSymbolVendorELF.a lib/liblldbPluginObjectContainerBSDArchive.a lib/liblldbPluginObjectContainerMachOArchive.a lib/liblldbPluginProcessGDBRemote.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginPlatformAndroid.a lib/liblldbPluginPlatformGDB.a lib/liblldbPluginPlatformFreeBSD.a lib/liblldbPluginPlatformKalimba.a lib/liblldbPluginPlatformLinux.a lib/liblldbPluginPlatformPOSIX.a lib/liblldbPluginPlatformWindows.a lib/liblldbPluginObjectContainerMachOArchive.a lib/liblldbPluginObjectContainerBSDArchive.a lib/liblldbPluginPlatformMacOSX.a lib/liblldbPluginDynamicLoaderMacOSXDYLD.a lib/liblldbPluginUnwindAssemblyInstEmulation.a lib/liblldbPluginUnwindAssemblyX86.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbPluginCXXItaniumABI.a lib/liblldbPluginABIMacOSX_arm.a lib/liblldbPluginABIMacOSX_arm64.a lib/liblldbPluginABIMacOSX_i386.a lib/liblldbPluginABISysV_x86_64.a lib/liblldbPluginABISysV_hexagon.a lib/liblldbPluginABISysV_ppc.a lib/liblldbPluginABISysV_ppc64.a lib/liblldbPluginInstructionARM.a lib/liblldbPluginInstructionARM64.a lib/liblldbPluginObjectFilePECOFF.a lib/liblldbPluginOSPython.a lib/liblldbPluginMemoryHistoryASan.a lib/liblldbPluginInstrumentationRuntimeAddressSanitizer.a lib/liblldbPluginSystemRuntimeMacOSX.a lib/liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.a lib/liblldbPluginProcessLinux.a lib/liblldbPluginProcessPOSIX.a lib/liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.a -Wl,--end-group lib/libclangAnalysis.a lib/libclangAST.a lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangEdit.a lib/libclangFrontend.a lib/libclangLex.a lib/libclangParse.a lib/libclangRewrite.a lib/libclangRewriteFrontend.a lib/libclangSema.a lib/libclangSerialization.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMInterpreter.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMCodeGen.a lib/libLLVMipo.a lib/libLLVMSelectionDAG.a lib/libLLVMBitReader.a lib/libLLVMMC.a lib/libLLVMMCJIT.a lib/libLLVMCore.a lib/libLLVMMCDisassembler.a lib/libLLVMExecutionEngine.a lib/libLLVMOption.a lib/libLLVMSupport.a -ledit -lpanel -lncurses -lpython2.7 lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86Desc.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMX86Info.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMMCDisassembler.a lib/libLLVMAArch64Utils.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMRuntimeDyld.a lib/libLLVMVectorize.a lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMInstrumentation.a lib/libLLVMLinker.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMipa.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMObject.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libLLVMBitReader.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangEdit.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMMC.a lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :
[3/48] : && /usr/bin/c++ -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-deprecated-register -fno-exceptions -fno-rtti -g -Wl,-allow-shlib-undefined -Wl,-O3 -Wl,--gc-sections tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-server.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-gdbserver.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-platform.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/__/__/source/lldb-log.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/__/__/source/lldb.cpp.o -o bin/lldb-server-3.7.0 lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMInterpreter.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMCodeGen.a lib/libLLVMipo.a lib/libLLVMSelectionDAG.a lib/libLLVMBitReader.a lib/libLLVMMC.a lib/libLLVMMCJIT.a lib/libLLVMCore.a lib/libLLVMMCDisassembler.a lib/libLLVMExecutionEngine.a lib/libLLVMOption.a lib/libLLVMSupport.a -Wl,--start-group lib/liblldbBreakpoint.a lib/liblldbCommands.a lib/liblldbDataFormatters.a lib/liblldbHost.a lib/liblldbCore.a lib/liblldbExpression.a lib/liblldbInterpreter.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbUtility.a lib/liblldbPluginDisassemblerLLVM.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFileSymtab.a lib/liblldbPluginDynamicLoaderStatic.a lib/liblldbPluginDynamicLoaderPosixDYLD.a lib/liblldbPluginDynamicLoaderHexagonDYLD.a lib/liblldbPluginObjectFileELF.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginSymbolVendorELF.a lib/liblldbPluginObjectContainerBSDArchive.a lib/liblldbPluginObjectContainerMachOArchive.a lib/liblldbPluginProcessGDBRemote.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginPlatformAndroid.a lib/liblldbPluginPlatformGDB.a lib/liblldbPluginPlatformFreeBSD.a lib/liblldbPluginPlatformKalimba.a lib/liblldbPluginPlatformLinux.a lib/liblldbPluginPlatformPOSIX.a lib/liblldbPluginPlatformWindows.a lib/liblldbPluginObjectContainerMachOArchive.a lib/liblldbPluginObjectContainerBSDArchive.a lib/liblldbPluginPlatformMacOSX.a lib/liblldbPluginDynamicLoaderMacOSXDYLD.a lib/liblldbPluginUnwindAssemblyInstEmulation.a lib/liblldbPluginUnwindAssemblyX86.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbPluginCXXItaniumABI.a lib/liblldbPluginABIMacOSX_arm.a lib/liblldbPluginABIMacOSX_arm64.a lib/liblldbPluginABIMacOSX_i386.a lib/liblldbPluginABISysV_x86_64.a lib/liblldbPluginABISysV_hexagon.a lib/liblldbPluginABISysV_ppc.a lib/liblldbPluginABISysV_ppc64.a lib/liblldbPluginInstructionARM.a lib/liblldbPluginInstructionARM64.a lib/liblldbPluginObjectFilePECOFF.a lib/liblldbPluginOSPython.a lib/liblldbPluginMemoryHistoryASan.a lib/liblldbPluginInstrumentationRuntimeAddressSanitizer.a lib/liblldbPluginSystemRuntimeMacOSX.a lib/liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.a lib/liblldbPluginProcessLinux.a lib/liblldbPluginProcessPOSIX.a lib/liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.a -Wl,--end-group lib/libclangAnalysis.a lib/libclangAST.a lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangEdit.a lib/libclangFrontend.a lib/libclangLex.a lib/libclangParse.a lib/libclangRewrite.a lib/libclangRewriteFrontend.a lib/libclangSema.a lib/libclangSerialization.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMInterpreter.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMCodeGen.a lib/libLLVMipo.a lib/libLLVMSelectionDAG.a lib/libLLVMBitReader.a lib/libLLVMMC.a lib/libLLVMMCJIT.a lib/libLLVMCore.a lib/libLLVMMCDisassembler.a lib/libLLVMExecutionEngine.a lib/libLLVMOption.a lib/libLLVMSupport.a -ledit -lpanel -lncurses -lpython2.7 lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86Desc.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMX86Info.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMMCDisassembler.a lib/libLLVMAArch64Utils.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMRuntimeDyld.a lib/libLLVMVectorize.a lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMInstrumentation.a lib/libLLVMLinker.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMipa.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMObject.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libLLVMBitReader.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangEdit.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMMC.a lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :

^C^C^Cninja: build stopped: interrupted by user.
^[[A

$ ninja -j 1
... <-- works fine

Thanks,
Ilia

Just a random guess is when you use parallel build then several link command are executed at the same time (because all have the same list of dependencies) and you run out of memory and the OS start to use swap what radically slows down the process (makes it unusable). During a full rebuild, I seen memory usage to go over 16 GB.

Tamas