diff options
author | Jacek Blaszczynski <biosciencenow@outlook.com> | 2017-10-17 14:19:20 +0200 |
---|---|---|
committer | Jacek Blaszczynski <biosciencenow@outlook.com> | 2017-10-17 14:19:20 +0200 |
commit | 89f6cb57c861db31a6bdff7257c857baf680a6d4 (patch) | |
tree | f58b5fb9fa927906c028373c98034635bb80cb63 /build.cmd | |
parent | d4a5e032efe65c6b84cb373a8a18d754ad4cf6aa (diff) | |
parent | fe88586cf7da09f4e6a90461239262d8c7d8eb61 (diff) | |
download | coreclr-89f6cb57c861db31a6bdff7257c857baf680a6d4.tar.gz coreclr-89f6cb57c861db31a6bdff7257c857baf680a6d4.tar.bz2 coreclr-89f6cb57c861db31a6bdff7257c857baf680a6d4.zip |
Merge branch 'master' of https://github.com/dotnet/coreclr
Diffstat (limited to 'build.cmd')
-rw-r--r-- | build.cmd | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -307,6 +307,16 @@ echo %__MsgPrefix%Checking prerequisites :: Eval the output from probe-win1.ps1 for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a +REM NumberOfEnabledCore is an WMI property providing number of enabled cores on machine +REM processor(s) and later is used to set optimal level of CL parallelism during native build step +if not defined NumberOfEnabledCore ( +REM Determine number of physical processor cores available on machine +for /f "tokens=*" %%I in ( + 'wmic cpu get NumberOfEnabledCore /value ^| find "=" 2^>NUL' + ) do set %%I +) +echo %__MsgPrefix%Number of available CPU cores %NumberOfEnabledCore% + REM ========================================================================================= REM === REM === Start the build steps @@ -418,7 +428,7 @@ if %__BuildNative% EQU 1 ( set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn! set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! - @call %__ProjectDir%\run.cmd build -Project=%__IntermediatesDir%\install.vcxproj -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! -configuration=%__BuildType% %nativePlatfromArgs% %__RunArgs% %__UnprocessedBuildArgs% + @call %__ProjectDir%\run.cmd build -Project=%__IntermediatesDir%\install.vcxproj -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! -configuration=%__BuildType% %nativePlatfromArgs% %__RunArgs% -ExtraParameters="/p:ForceImportBeforeCppTargets=%__ProjectDir%/clr.nativebuild.props /m:2" %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details: @@ -487,10 +497,10 @@ if /i "%__DoCrossArchBuild%"=="1" ( set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog! set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn! set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! - - @call %__ProjectDir%\run.cmd build -Project=%__CrossCompIntermediatesDir%\install.vcxproj -configuration=%__BuildType% -platform=%__CrossArch% -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! %__RunArgs% %__UnprocessedBuildArgs% - if not !errorlevel! == 0 ( + @call %__ProjectDir%\run.cmd build -Project=%__CrossCompIntermediatesDir%\install.vcxproj -configuration=%__BuildType% -platform=%__CrossArch% -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! %__RunArgs% -ExtraParameters="/p:ForceImportBeforeCppTargets=%__ProjectDir%/clr.nativebuild.props /m:2" %__UnprocessedBuildArgs% + + if not !errorlevel! == 0 ( echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details: echo !__BuildLog! echo !__BuildWrn! |