summaryrefslogtreecommitdiff
path: root/functions.cmake
diff options
context:
space:
mode:
authorJacek Blaszczynski <biosciencenow@outlook.com>2017-11-04 19:11:25 +0100
committerWes Haggard <weshaggard@users.noreply.github.com>2017-11-04 11:11:25 -0700
commit5a01d8a39576f0d07441e4d123a90138f4ae0735 (patch)
treef1f4f9e4f368181d8ba3d86ff563100157f8eb73 /functions.cmake
parent9345244f8172de638223cd7c1e48a5cd169185eb (diff)
downloadcoreclr-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 'functions.cmake')
-rw-r--r--functions.cmake1
1 files changed, 0 insertions, 1 deletions
diff --git a/functions.cmake b/functions.cmake
index 3fb0e46e68..afa3d6ebf6 100644
--- a/functions.cmake
+++ b/functions.cmake
@@ -266,4 +266,3 @@ function(add_executable_clr)
_add_executable(${ARGV})
add_dependencies(${ARGV0} GeneratedEventingFiles)
endfunction()
-