anchor.diff:  echo %__MsgPrefix%Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType%
   
   REM Use setlocal to restrict environment changes form vcvarsall.bat and more to just this native components build section.
  -setlocal EnableDelayedExpansion
  +setlocal EnableDelayedExpansion EnableExtensions
   
   if /i not "%__BuildArch%" == "arm64" goto NotArm64Build
   
  
positive.code: echo %__MsgPrefix%Commencing build of mscorlib for %__BuildOS%.%__BuildArch%.%__BuildType%
  
  REM setlocal to prepare for vsdevcmd.bat
  setlocal EnableDelayedExpansion
  
  rem Explicitly set Platform causes conflicts in mscorlib project files. Clear it to allow building from VS x64 Native Tools Command Prompt
  set Platform=
  
negative.code: 
  REM =========================================================================================
  REM ===
  REM === Handle the "all" case.
  REM ===
  REM =========================================================================================
  
  :BuildAll
  
  set __BuildArchList=
  
  set /A __TotalSpecifiedBuildArch=__BuildArchX64 + __BuildArchX86 + __BuildArchArm + __BuildArchArm64
  if %__TotalSpecifiedBuildArch% EQU 0 (
      REM Nothing specified means we want to build all architectures.
      set __BuildArchList=x64 x86 arm arm64
  )
  
  REM Otherwise, add all the specified architectures to the list.
  
  if %__BuildArchX64%==1      set __BuildArchList=%__BuildArchList% x64
  if %__BuildArchX86%==1      set __BuildArchList=%__BuildArchList% x86
  if %__BuildArchArm%==1      set __BuildArchList=%__BuildArchList% arm
  if %__BuildArchArm64%==1    set __BuildArchList=%__BuildArchList% arm64
  
  set __BuildTypeList=
  
  set /A __TotalSpecifiedBuildType=__BuildTypeDebug + __BuildTypeChecked + __BuildTypeRelease
  if %__TotalSpecifiedBuildType% EQU 0 (
      REM Nothing specified means we want to build all build types.
      set __BuildTypeList=Debug Checked Release
  )
  
  if %__BuildTypeDebug%==1    set __BuildTypeList=%__BuildTypeList% Debug
  if %__BuildTypeChecked%==1  set __BuildTypeList=%__BuildTypeList% Checked
  if %__BuildTypeRelease%==1  set __BuildTypeList=%__BuildTypeList% Release
  
  REM Create a temporary file to collect build results. We always build all flavors specified, and
  REM report a summary of the results at the end.
  
  set __AllBuildSuccess=true
  set __BuildResultFile=%TEMP%\build-all-summary-%RANDOM%.txt
  if exist %__BuildResultFile% del /f /q %__BuildResultFile%
  
  for %%i in (%__BuildArchList%) do (
      for %%j in (%__BuildTypeList%) do (
          call :BuildOne %%i %%j
      )
  )
  
  if %__AllBuildSuccess%==true (
      echo %__MsgPrefix%All builds succeeded!
      exit /b 0
  ) else (
      echo %__MsgPrefix%Builds failed:
      type %__BuildResultFile%
      del /f /q %__BuildResultFile%
      exit /b 1
  )
  
  REM This code is unreachable, but leaving it nonetheless, just in case things change.
  exit /b 99
  
  :BuildOne
  set __BuildArch=%1
  set __BuildType=%2
  set __NextCmd=call %__ThisScriptFull% %__BuildArch% %__BuildType% %__PassThroughArgs%
  echo %__MsgPrefix%Invoking: %__NextCmd%
  %__NextCmd%
  if errorlevel 1 (
      echo %__MsgPrefix%    %__BuildArch% %__BuildType% %__PassThroughArgs% >> %__BuildResultFile%
      set __AllBuildSuccess=false
  )
  exit /b 0
  
  REM =========================================================================================
  REM ===
  REM === Helper routines
  REM ===
  REM =========================================================================================
  
  :Usage
  echo.
  echo Build the CoreCLR repo.
  echo.
  echo Usage:
  echo     %__ThisScriptShort% [option1] [option2] ...
  echo or:
  echo     %__ThisScriptShort% all [option1] [option2] ...
  echo.
  echo All arguments are optional. The options are:
  echo.
  echo./? -? /h -h /help -help: view this message.
  