Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@
<!-- Import the Arcade SDK -->
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- MSBuild parallelism settings for better build performance.
See https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/ -->
<PropertyGroup>
<UseMultiToolTask>true</UseMultiToolTask>
<EnforceProcessCountAcrossBuilds>true</EnforceProcessCountAcrossBuilds>
<EnableClServerMode>true</EnableClServerMode>
</PropertyGroup>

<!-- The TFMs to build and test against. -->
<PropertyGroup>
<NetCoreAppCurrentVersion>11.0</NetCoreAppCurrentVersion>
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<SignAssembly Condition="'$(UsingMicrosoftNETSdk)' != 'true'">false</SignAssembly>
<CL_MPCount>$(NumberOfCores)</CL_MPCount>
</PropertyGroup>
</Project>
12 changes: 0 additions & 12 deletions src/coreclr/build-runtime.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -266,18 +266,6 @@ echo %__MsgPrefix%Using CMake from !CMakePath!

:SkipLocateCMake

REM NumberOfCores is an WMI property providing number of physical cores on machine
REM processor(s). It is used to set optimal level of CL parallelism during native build step
if not defined NumberOfCores (
REM Determine number of physical processor cores available on machine
set TotalNumberOfCores=0
for /f "tokens=*" %%I in (
'wmic cpu get NumberOfCores /value ^| find "=" 2^>NUL'
) do set %%I & set /a TotalNumberOfCores=TotalNumberOfCores+NumberOfCores
set NumberOfCores=!TotalNumberOfCores!
)
echo %__MsgPrefix%Number of processor cores %NumberOfCores%

REM =========================================================================================
REM ===
REM === Start the build steps
Expand Down
12 changes: 0 additions & 12 deletions src/tests/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,6 @@ echo %__MsgPrefix%Commencing build of native test components for %__BuildArch%/%

REM Set the environment for the native build

REM NumberOfCores is an WMI property providing number of physical cores on machine
REM processor(s). It is used to set optimal level of CL parallelism during native build step
if not defined NumberOfCores (
REM Determine number of physical processor cores available on machine
set TotalNumberOfCores=0
for /f "tokens=*" %%I in (
'wmic cpu get NumberOfCores /value ^| find "=" 2^>NUL'
) do set %%I & set /a TotalNumberOfCores=TotalNumberOfCores+NumberOfCores
set NumberOfCores=!TotalNumberOfCores!
)
echo %__MsgPrefix%Number of processor cores %NumberOfCores%

@if defined _echo @echo on

set __ExtraCmakeArgs=
Expand Down
Loading