Skip to content

Commit

Permalink
Merge pull request #43233 from jmarolf/infra/reduce-restore-times
Browse files Browse the repository at this point in the history
use static graph to reduce restore times
  • Loading branch information
jmarolf authored Apr 13, 2020
2 parents 5c681cc + 5697f5e commit 6704bf4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ function BuildSolution() {
# Set DotNetBuildFromSource to 'true' if we're simulating building for source-build.
$buildFromSource = if ($sourceBuild) { "/p:DotNetBuildFromSource=true" } else { "" }

# If we are using msbuild.exe restore using static graph
# This check can be removed and turned on for all builds once roslyn depends on a .NET Core SDK
# that has a new enough msbuild for the -graph switch to be present
$restoreUseStaticGraphEvaluation = if ($msbuildEngine -ne 'dotnet') { "/p:RestoreUseStaticGraphEvaluation=true" } else { "" }

try {
MSBuild $toolsetBuildProj `
$bl `
Expand All @@ -261,6 +266,7 @@ function BuildSolution() {
/p:VisualStudioIbcDropId=$ibcDropId `
/p:EnableNgenOptimization=$applyOptimizationData `
/p:IbcOptimizationDataDir=$ibcDir `
$restoreUseStaticGraphEvaluation `
$suppressExtensionDeployment `
$msbuildWarnAsError `
$buildFromSource `
Expand Down

0 comments on commit 6704bf4

Please sign in to comment.