diff options
author | Jacek Blaszczynski <biosciencenow@outlook.com> | 2017-11-04 19:11:25 +0100 |
---|---|---|
committer | Wes Haggard <weshaggard@users.noreply.github.com> | 2017-11-04 11:11:25 -0700 |
commit | 5a01d8a39576f0d07441e4d123a90138f4ae0735 (patch) | |
tree | f1f4f9e4f368181d8ba3d86ff563100157f8eb73 /src | |
parent | 9345244f8172de638223cd7c1e48a5cd169185eb (diff) | |
download | coreclr-5a01d8a39576f0d07441e4d123a90138f4ae0735.tar.gz coreclr-5a01d8a39576f0d07441e4d123a90138f4ae0735.tar.bz2 coreclr-5a01d8a39576f0d07441e4d123a90138f4ae0735.zip |
[Infrastructure] Use MSBuild v15 extension point to control CL parallelism, abstract MSBuild /maxcpucount switch (#14578)
This commit frees -ExtraParameters and uses MSBuild v15 extension point to control CL compiler parallelism.
If MSBuild 15.0 is available - installed with Visual Studio 2017 - CL parallelism control is achieved by using extension point in Microsoft.Common.props file which allows to include Directory.Build.props - for details see [Microsoft.Common.props] [1] file in MSBuild repo. https://github.com/Microsoft/msbuild/blob/b38e4ceeaaec36c5237ae698041e9b9f18c84876/src/Tasks/Microsoft.Common.props#L36.
MSBuild parallelism is controled via abstracted /maxcpucount command line switch
which now is available as -MSBuildNodeCount pass through run.cmd/run.sh command line
argument with default value equal to /maxcpucount (what defaults to number of logical processors).
This allows to control MSBuild parallelism on all supported platforms.
It is possible to control MSBuild parallelism programatically via MSBuild public
API using MaxNodeCount properties available on the following APIs:
Microsoft.Build.Evaluation.ProjectCollection.MaxNodeCount
Microsoft.Build.Execution.BuildParameters.MaxNodeCount
It's use in current build infrastructure would require creating unnecessary
complexity and was ruled out.
Diffstat (limited to 'src')
6 files changed, 6 insertions, 6 deletions
diff --git a/src/ToolBox/superpmi/mcs/CMakeLists.txt b/src/ToolBox/superpmi/mcs/CMakeLists.txt index ebacd0761c..0856b6f5e6 100644 --- a/src/ToolBox/superpmi/mcs/CMakeLists.txt +++ b/src/ToolBox/superpmi/mcs/CMakeLists.txt @@ -49,7 +49,7 @@ add_precompiled_header( MCS_SOURCES ) -add_executable(mcs +_add_executable(mcs ${MCS_SOURCES} ) diff --git a/src/ToolBox/superpmi/superpmi-shim-collector/CMakeLists.txt b/src/ToolBox/superpmi/superpmi-shim-collector/CMakeLists.txt index bcd5c3b24f..3e0df52808 100644 --- a/src/ToolBox/superpmi/superpmi-shim-collector/CMakeLists.txt +++ b/src/ToolBox/superpmi/superpmi-shim-collector/CMakeLists.txt @@ -48,7 +48,7 @@ if (WIN32) list(APPEND SUPERPMI_SHIM_COLLECTOR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/superpmi-shim-collector.def) endif (WIN32) -add_library(superpmi-shim-collector +_add_library(superpmi-shim-collector SHARED ${SUPERPMI_SHIM_COLLECTOR_SOURCES} ) diff --git a/src/ToolBox/superpmi/superpmi-shim-counter/CMakeLists.txt b/src/ToolBox/superpmi/superpmi-shim-counter/CMakeLists.txt index 3a81b8ad12..232c8d96be 100644 --- a/src/ToolBox/superpmi/superpmi-shim-counter/CMakeLists.txt +++ b/src/ToolBox/superpmi/superpmi-shim-counter/CMakeLists.txt @@ -49,7 +49,7 @@ if (WIN32) list(APPEND SUPERPMI_SHIM_COUNTER_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/superpmi-shim-counter.def) endif (WIN32) -add_library(superpmi-shim-counter +_add_library(superpmi-shim-counter SHARED ${SUPERPMI_SHIM_COUNTER_SOURCES} ) diff --git a/src/ToolBox/superpmi/superpmi-shim-simple/CMakeLists.txt b/src/ToolBox/superpmi/superpmi-shim-simple/CMakeLists.txt index 59f3045709..f37c1d2416 100644 --- a/src/ToolBox/superpmi/superpmi-shim-simple/CMakeLists.txt +++ b/src/ToolBox/superpmi/superpmi-shim-simple/CMakeLists.txt @@ -48,7 +48,7 @@ if (WIN32) list(APPEND SUPERPMI_SHIM_SIMPLE_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/superpmi-shim-simple.def) endif (WIN32) -add_library(superpmi-shim-simple +_add_library(superpmi-shim-simple SHARED ${SUPERPMI_SHIM_SIMPLE_SOURCES} ) diff --git a/src/ToolBox/superpmi/superpmi/CMakeLists.txt b/src/ToolBox/superpmi/superpmi/CMakeLists.txt index 5b9897e02b..bbea80515d 100644 --- a/src/ToolBox/superpmi/superpmi/CMakeLists.txt +++ b/src/ToolBox/superpmi/superpmi/CMakeLists.txt @@ -49,7 +49,7 @@ add_precompiled_header( SUPERPMI_SOURCES ) -add_executable(superpmi +_add_executable(superpmi ${SUPERPMI_SOURCES} ) diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt index 82582f4def..fba524a405 100644 --- a/src/dlls/mscordac/CMakeLists.txt +++ b/src/dlls/mscordac/CMakeLists.txt @@ -60,7 +60,7 @@ endif(CLR_CMAKE_PLATFORM_DARWIN) # Create object library to enable creation of proper dependency of mscordaccore.exp on mscordac.obj and # mscordaccore on both the mscordaccore.exp and mscordac.obj. -add_library(mscordacobj OBJECT mscordac.cpp) +_add_library(mscordacobj OBJECT mscordac.cpp) add_library_clr(mscordaccore SHARED ${CLR_DAC_SOURCES} $<TARGET_OBJECTS:mscordacobj>) |