[llvm-commits] [PATCH] Add MSVC multi processor compilation to build system
Óscar Fuentes
ofv at wanadoo.es
Tue Mar 1 17:40:02 PST 2011
NAKAMURA Takumi <geek4civic at gmail.com> writes:
> On Wed, Mar 2, 2011 at 9:59 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:
>> Okay, thanks. But IIRC last time I built LLVM with VS 10 it used all 4
>> cores. If you have checked that /MP is required for parallel builds, no
>> objection here. Don't forget documenting the option in docs/CMake.html.
>
> On MSVS10 IDE w/o /MP, building goes parallel by project.vcxproj, IIRC.
> eg. LLVMSupport was built sequentially.
Thanks Takumi.
After reading the documentation for /MP on msdn I think that it would be
better to specifiy the number of processors, instead of only offering 1
or all:
if( MSVC_IDE )
set(LLVM_COMPILER_JOBS "0" CACHE STRING
"Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
if( NOT LLVM_COMPILER_JOBS STREQUAL "1" )
if( LLVM_COMPILER_JOBS STREQUAL "0" )
add_llvm_definitions( /MP )
else
add_llvm_definitions( /MP${LLVM_COMPILER_JOBS} )
endif()
endif()
More information about the llvm-commits
mailing list