Add enforcepgo for release Windows_NT default release build (dotnet/coreclr#13275)
authorVictor "Nate" Graf <nategraf1@gmail.com>
Thu, 10 Aug 2017 15:47:44 +0000 (08:47 -0700)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2017 15:47:44 +0000 (08:47 -0700)
* Add enforcepgo for release Windows_NT default release build

* Restrict enforment of PGO to PGO supported builds

* Expand the usage of enforcpgo

* Fix break in the if-else control flow

Commit migrated from https://github.com/dotnet/coreclr/commit/b07a921524ec9e8c8f5e482707f9fc1b9b86d95e

src/coreclr/netci.groovy

index b93b072..8aa10ee 100755 (executable)
@@ -1431,6 +1431,11 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                         buildCommands += "tests\\scripts\\build_illink.cmd clone ${arch}"
                     }
 
+                    // If it is a release build for windows, ensure PGO is used, else fail the build
+                    if ((lowerConfiguration == 'release') && (scenario in Constants.basicScenarios) && (architecture != 'x86lb')) {
+                        buildOpts += ' enforcepgo'
+                    }
+
                     if (Constants.jitStressModeScenarios.containsKey(scenario) ||
                             scenario == 'default' ||
                             scenario == 'r2r' ||