Sysprogs forums › Forums › VisualGDB › multi-core compiling
- This topic has 5 replies, 4 voices, and was last updated 9 years, 2 months ago by
support.
-
AuthorPosts
-
March 24, 2015 at 17:05 #6270
michael.s
ParticipantI use VisualGDB to crosscompile for the Raspberry. One of the reasons is obviously to speed up the compilation. When I compile my project, I notice that my CPU usage is only between 35-45% and each job seems to be startet consecutivly, like this:
1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -std=c++11 -w -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -Ic:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/usr/local/include -IDebug -IDebug -o Debug/MemberData.o Base/MemberData.cpp 1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -std=c++11 -w -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -Ic:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -Ic:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/usr/local/include -IDebug -IDebug -o Debug/Message.o Base/Message.cpp
compiling under a SDD the bottleneck here is probably not the hdd, but the insufficient use of all the cores. under VS i could normally add the -MPXX flag or with make the ‘-j’ flag. how can i speed it up using virtualGDB
thanks
March 25, 2015 at 00:57 #6291support
KeymasterHi,
Simply add “-j <number of cores>” to the Make command line arguments in VisualGDB Project Properties to enable parallel building.
July 18, 2016 at 23:24 #8627b.timofte
ParticipantWhere should i add this option ? Your answer is not clear
July 19, 2016 at 03:03 #8629support
KeymasterHi,
Sorry for the confusion. Please refer to the screenshot below for details:

Note that $(LocalMultiThreadedBuildFlags) is case-sensitive. It will automatically be replaced with -j(number of CPU cores on your machine) during build.
August 21, 2016 at 17:56 #8897thm
ParticipantThanks, this makes a huge difference.
Is there a reason why its not enabled by default for new projects?
August 22, 2016 at 04:26 #8898support
KeymasterHi,
Yes, it sometimes causes Make to simply hang. VisualGDB 5.2 will come with a separate MSBuild platform that will integrate the existing toolchains directly into the Visual Studio build system, so the multi-threaded build will be automatic and it won’t trigger the Make bug.
-
AuthorPosts
- You must be logged in to reply to this topic.