Fix rough edges after CLI update (dotnet/corert#3983)
[platform/upstream/coreclr.git] / build.cmd
index fe9ccb8..f77c7d2 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -242,7 +242,7 @@ REM === Restore optimization profile data
 REM ===
 REM =========================================================================================
 
-if %__RestoreOptData% EQU 1 (
+if %__RestoreOptData% EQU 1 if %__BuildTypeRelease% EQU 1 (
     echo %__MsgPrefix%Restoring the OptimizationData Package
     @call %__ProjectDir%\run.cmd sync -optdata
     if not !errorlevel! == 0 (
@@ -315,7 +315,7 @@ if %__BuildNative% EQU 1 (
 
     pushd "%__IntermediatesDir%"
     set __ExtraCmakeArgs=!___SDKVersion! "-DCLR_CMAKE_TARGET_OS=%__BuildOs%" "-DCLR_CMAKE_PACKAGES_DIR=%__PackagesDir%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_VERSION=%__PgoOptDataVersion%"
-    call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch% %__BuildStandaloneGC% !__ExtraCmakeArgs!
+    call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch% %__BuildStandaloneGC% %__BuildStandaloneGCOnly% !__ExtraCmakeArgs!
        @if defined _echo @echo on
     popd
 :SkipConfigure