summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorjashook <jashoo@microsoft.com>2019-06-12 22:16:40 +0000
committerjashook <jashoo@microsoft.com>2019-06-12 22:16:40 +0000
commitff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68 (patch)
tree6497039bc8893d7bc8de44ba32ed88a803886f1c /build.cmd
parent938383a60ffbb716e01dbbf941a239d4bfa7aaf6 (diff)
downloadcoreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.tar.gz
coreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.tar.bz2
coreclr-ff5f14a7c3440ab918beb3aa5b1b14ec1dbaad68.zip
Change how build.sh/build.cmd parse the PGO and IBC versions
This will reduce fragility in our build pipeline, by explicitely controlling the output of dotnet msbuild. It also unblocks the source-build effort, as source-build will write extra console output breaking our old parsing.
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd19
1 files changed, 15 insertions, 4 deletions
diff --git a/build.cmd b/build.cmd
index 1e2030c124..8828901160 100644
--- a/build.cmd
+++ b/build.cmd
@@ -390,13 +390,24 @@ if %__RestoreOptData% EQU 1 (
)
REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
-for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo') do (
- set __PgoOptDataVersion=%%s
+call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo
+
+if not exist "%__IntermediatesDir%\optdataversion.txt" (
+ echo "Failed to get PGO data package version."
+ exit /b !errorlevel!
)
-for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo') do (
- set __IbcOptDataVersion=%%s
+
+set /p __PgoOptDataVersion<"%__IntermediatesDir%\optdataversion.txt"
+
+call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo
+
+if not exist "%__IntermediatesDir%\ibcoptdataversion.txt" (
+ echo "Failed to get PGO data package version."
+ exit /b !errorlevel!
)
+set /p __IbcOptDataVersion=<"%__IntermediatesDir%\ibcoptdataversion.txt"
+
REM =========================================================================================
REM ===
REM === Generate source files for eventing