diff options
author | Daniel Podder <dapodd@microsoft.com> | 2017-06-01 18:41:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 18:41:50 -0500 |
commit | 8f5d775cb4de2b3e765251106991940c09c0859e (patch) | |
tree | 333d3845d0529faf20bcecf5511d2b90185e5894 /build.cmd | |
parent | 91329ceefd9efbde1f8486b0a098090e9a10adcb (diff) | |
download | coreclr-8f5d775cb4de2b3e765251106991940c09c0859e.tar.gz coreclr-8f5d775cb4de2b3e765251106991940c09c0859e.tar.bz2 coreclr-8f5d775cb4de2b3e765251106991940c09c0859e.zip |
Fix optdata restore functionality (#11935)
Fix optdata restore functionality (#11935)
Bring back optdata restore functionality following the move to 2.0
BuildTools and csproj-based CLI. Disable a harmless warning that broke
the Linux build when consuming PGO counts due to -Werr.
Fix #11796 for master
Diffstat (limited to 'build.cmd')
-rw-r--r-- | build.cmd | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -236,21 +236,6 @@ REM === Restore optimization profile data REM === REM ========================================================================================= -REM Parse the package version out of project.json so that we can pass it on to CMake -where /q python || ( - echo %__MsgPrefix%Error: Python not found on PATH, please make sure that it is installed. - exit /b 1 -) -set OptDataProjectJsonPath=%__ProjectDir%\src\.nuget\optdata\project.json -if EXIST "%OptDataProjectJsonPath%" ( - for /f "tokens=*" %%s in ('python "%__ProjectDir%\extract-from-json.py" -rf "%OptDataProjectJsonPath%" dependencies optimization.PGO.CoreCLR') do @( - set __PgoOptDataVersion=%%s - ) - for /f "tokens=*" %%s in ('python "%__ProjectDir%\extract-from-json.py" -rf "%OptDataProjectJsonPath%" dependencies optimization.IBC.CoreCLR') do @( - set __IbcOptDataVersion=%%s - ) -) - if %__RestoreOptData% EQU 1 ( echo %__MsgPrefix%Restoring the OptimizationData Package @call %__ProjectDir%\run.cmd sync -optdata @@ -260,6 +245,20 @@ if %__RestoreOptData% EQU 1 ( ) ) +REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake +set DotNetCli=%__ProjectDir%\Tools\dotnetcli\dotnet.exe +if not exist "%DotNetCli%" ( + echo Assertion failed: dotnet.exe not found at path "%DotNetCli%" + exit /b 1 +) +set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj +for /f "tokens=*" %%s in ('%DotNetCli% msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo') do @( + set __PgoOptDataVersion=%%s +) +for /f "tokens=*" %%s in ('%DotNetCli% msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo') do @( + set __IbcOptDataVersion=%%s +) + REM ========================================================================================= REM === REM === Build the CLR VM |