Remove deprecated build scripts. (#35115)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Mon, 4 May 2020 14:13:50 +0000 (07:13 -0700)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 14:13:50 +0000 (16:13 +0200)
src/coreclr/build.cmd [deleted file]
src/coreclr/build.sh [deleted file]
src/coreclr/src/build.proj [deleted file]

diff --git a/src/coreclr/build.cmd b/src/coreclr/build.cmd
deleted file mode 100644 (file)
index 8c0ffad..0000000
+++ /dev/null
@@ -1,1018 +0,0 @@
-@if not defined _echo @echo off
-setlocal EnableDelayedExpansion EnableExtensions
-
-:: Define a prefix for most output progress messages that come from this script. That makes
-:: it easier to see where these are coming from. Note that there is a trailing space here.
-set "__MsgPrefix=BUILD: "
-
-echo %__MsgPrefix%Starting Build at %TIME%
-echo %__MsgPrefix%WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.cmd script.
-echo %__MsgPrefix%See https://github.com/dotnet/runtime/issues/32991 for more information.
-
-set __ThisScriptFull="%~f0"
-set __ThisScriptDir="%~dp0"
-
-call "%__ThisScriptDir%"\setup_vs_tools.cmd
-if NOT '%ERRORLEVEL%' == '0' goto ExitWithError
-
-if defined VS160COMNTOOLS (
-    set "__VSToolsRoot=%VS160COMNTOOLS%"
-    set "__VCToolsRoot=%VS160COMNTOOLS%\..\..\VC\Auxiliary\Build"
-    set __VSVersion=vs2019
-) else if defined VS150COMNTOOLS (
-    set "__VSToolsRoot=%VS150COMNTOOLS%"
-    set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
-    set __VSVersion=vs2017
-)
-
-:: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set:
-::      __BuildArch         -- default: x64
-::      __BuildType         -- default: Debug
-::      __TargetOS           -- default: Windows_NT
-::      __ProjectDir        -- default: directory of the dir.props file
-::      __RepoRootDir       -- default: directory two levels above the dir.props file
-::      __SourceDir         -- default: %__ProjectDir%\src\
-::      __RootBinDir        -- default: %__RepoRootDir%\artifacts\
-::      __BinDir            -- default: %__RootBinDir%\%__TargetOS%.%__BuildArch.%__BuildType%\
-::      __IntermediatesDir
-::      __PackagesBinDir    -- default: %__BinDir%\.nuget
-::
-:: Thus, these variables are not simply internal to this script!
-
-:: Set the default arguments for build
-set __BuildArch=x64
-set __BuildType=Debug
-set __TargetOS=Windows_NT
-
-:: Set the various build properties here so that CMake and MSBuild can pick them up
-set "__ProjectDir=%~dp0"
-:: remove trailing slash
-if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
-set "__RepoRootDir=%__ProjectDir%\..\.."
-
-set "__ProjectFilesDir=%__ProjectDir%"
-set "__SourceDir=%__ProjectDir%\src"
-set "__RootBinDir=%__RepoRootDir%\artifacts"
-
-set __BuildAll=
-
-set __BuildArchX64=0
-set __BuildArchX86=0
-set __BuildArchArm=0
-set __BuildArchArm64=0
-
-set __BuildTypeDebug=0
-set __BuildTypeChecked=0
-set __BuildTypeRelease=0
-
-set __PgoInstrument=0
-set __PgoOptimize=1
-set __EnforcePgo=0
-set __IbcTuning=
-
-REM __PassThroughArgs is a set of things that will be passed through to nested calls to build.cmd
-REM when using "all".
-set __PassThroughArgs=
-
-REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64)
-set "__args= %*"
-set processedArgs=
-set __UnprocessedBuildArgs=
-set __CommonMSBuildArgs=
-
-set __BuildCoreLib=1
-set __BuildNative=1
-set __BuildCrossArchNative=0
-set __SkipCrossArchNative=0
-set __BuildTests=1
-set __BuildPackages=1
-set __BuildNativeCoreLib=1
-set __BuildManagedTools=1
-set __RestoreOptData=1
-set __GenerateLayout=0
-set __CrossgenAltJit=
-set __SkipRestoreArg=/p:RestoreDuringBuild=true
-set __OfficialBuildIdArg=
-set __CrossArch=
-set __PgoOptDataPath=
-
-@REM CMD has a nasty habit of eating "=" on the argument list, so passing:
-@REM    -priority=1
-@REM appears to CMD parsing as "-priority 1". Handle -priority specially to avoid problems,
-@REM and allow the "-priority=1" syntax.
-set __Priority=
-
-:Arg_Loop
-if "%1" == "" goto ArgsDone
-
-if /i "%1" == "/?"     goto Usage
-if /i "%1" == "-?"     goto Usage
-if /i "%1" == "/h"     goto Usage
-if /i "%1" == "-h"     goto Usage
-if /i "%1" == "/help"  goto Usage
-if /i "%1" == "-help"  goto Usage
-if /i "%1" == "--help" goto Usage
-
-if /i "%1" == "-all"                 (set __BuildAll=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-x64"                 (set __BuildArchX64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-x86"                 (set __BuildArchX86=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-arm"                 (set __BuildArchArm=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-arm64"               (set __BuildArchArm64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-if /i "%1" == "-debug"               (set __BuildTypeDebug=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-checked"             (set __BuildTypeChecked=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-release"             (set __BuildTypeRelease=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-
-REM TODO these are deprecated remove them eventually
-REM don't add more, use the - syntax instead
-if /i "%1" == "all"                 (set __BuildAll=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "x64"                 (set __BuildArchX64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "x86"                 (set __BuildArchX86=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "arm"                 (set __BuildArchArm=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "arm64"               (set __BuildArchArm64=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-if /i "%1" == "debug"               (set __BuildTypeDebug=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "checked"             (set __BuildTypeChecked=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "release"             (set __BuildTypeRelease=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-if /i "%1" == "-priority"           (set __Priority=%2&shift&set processedArgs=!processedArgs! %1=%2&shift&goto Arg_Loop)
-
-REM Explicitly block -Rebuild.
-if /i "%1" == "Rebuild" (
-    echo "ERROR: 'Rebuild' is not supported.  Please remove it."
-    goto Usage
-)
-if /i "%1" == "-Rebuild" (
-    echo "ERROR: 'Rebuild' is not supported.  Please remove it."
-    goto Usage
-)
-
-
-REM All arguments after this point will be passed through directly to build.cmd on nested invocations
-REM using the "all" argument, and must be added to the __PassThroughArgs variable.
-if [!__PassThroughArgs!]==[] (
-    set __PassThroughArgs=%1
-) else (
-    set __PassThroughArgs=%__PassThroughArgs% %1
-)
-
-if /i "%1" == "-ci"                  (set __ArcadeScriptArgs="-ci"&set __ErrMsgPrefix=##vso[task.logissue type=error]&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-OfficialBuildId"     (set __OfficialBuildIdArg=/p:OfficialBuildId=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1=%2&shift&shift&goto Arg_Loop)
-
-if /i "%1" == "-alpinedac"           (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-linuxdac"            (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-if /i "%1" == "-freebsdmscorlib"     (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-linuxmscorlib"       (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-netbsdmscorlib"      (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-osxmscorlib"         (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-windowsmscorlib"     (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-nativemscorlib"      (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-configureonly"       (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipconfigure"       (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipmscorlib"        (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipnative"          (set __BuildNative=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipcrossarchnative" (set __SkipCrossArchNative=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skiptests"           (set __BuildTests=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipbuildpackages"   (set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skipmanagedtools"    (set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-skiprestoreoptdata"  (set __RestoreOptData=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-generatelayout"      (set __GenerateLayout=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-usenmakemakefiles"   (set __NMakeMakefiles=1&set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-pgoinstrument"       (set __PgoInstrument=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-enforcepgo"          (set __EnforcePgo=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-nopgooptimize"       (set __PgoOptimize=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-ibcinstrument"       (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "-crossgenaltjit"      (set __CrossgenAltJit=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-REM TODO remove these once they are no longer used in buildpipeline
-if /i "%1" == "-skiprestore"         (set __SkipRestoreArg=/p:RestoreDuringBuild=false&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-REM TODO these are deprecated remove them eventually
-REM don't add more, use the - syntax instead
-if /i "%1" == "freebsdmscorlib"     (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "linuxmscorlib"       (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "netbsdmscorlib"      (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "osxmscorlib"         (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "windowsmscorlib"     (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "nativemscorlib"      (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "configureonly"       (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipconfigure"       (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipmscorlib"        (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipnative"          (set __BuildNative=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipcrossarchnative" (set __SkipCrossArchNative=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skiptests"           (set __BuildTests=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skipbuildpackages"   (set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "skiprestoreoptdata"  (set __RestoreOptData=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "generatelayout"      (set __GenerateLayout=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "usenmakemakefiles"   (set __NMakeMakefiles=1&set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "pgoinstrument"       (set __PgoInstrument=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "nopgooptimize"       (set __PgoOptimize=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "enforcepgo"          (set __EnforcePgo=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "ibcinstrument"       (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "crossgenaltjit"      (set __CrossgenAltJit=%2&set __PassThroughArgs=%__PassThroughArgs% %2set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-REM TODO remove this once it's no longer used in buildpipeline
-if /i "%1" == "--"                  (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-
-if [!processedArgs!]==[] (
-    set __UnprocessedBuildArgs=%__args%
-) else (
-    set __UnprocessedBuildArgs=%__args%
-    for %%t in (!processedArgs!) do (
-        set __UnprocessedBuildArgs=!__UnprocessedBuildArgs:*%%t=!
-    )
-)
-
-:ArgsDone
-
-@REM Special handling for -priority=N argument.
-if defined __Priority (
-    if defined __PassThroughArgs (
-        set __PassThroughArgs=%__PassThroughArgs% -priority=%__Priority%
-    ) else (
-        set __PassThroughArgs=-priority=%__Priority%
-    )
-)
-
-if defined __BuildAll goto BuildAll
-
-set /A __TotalSpecifiedBuildArch=__BuildArchX64 + __BuildArchX86 + __BuildArchArm + __BuildArchArm64
-if %__TotalSpecifiedBuildArch% GTR 1 (
-    echo Error: more than one build architecture specified, but "all" not specified.
-    goto Usage
-)
-
-if %__BuildArchX64%==1      set __BuildArch=x64
-if %__BuildArchX86%==1      set __BuildArch=x86
-if %__BuildArchArm%==1 (
-    set __BuildArch=arm
-    set __CrossArch=x86
-)
-if %__BuildArchArm64%==1 (
-    set __BuildArch=arm64
-    set __CrossArch=x64
-)
-
-set /A __TotalSpecifiedBuildType=__BuildTypeDebug + __BuildTypeChecked + __BuildTypeRelease
-if %__TotalSpecifiedBuildType% GTR 1 (
-    echo Error: more than one build type specified, but "all" not specified.
-    goto Usage
-)
-
-if %__BuildTypeDebug%==1    set __BuildType=Debug
-if %__BuildTypeChecked%==1  set __BuildType=Checked
-if %__BuildTypeRelease%==1  set __BuildType=Release
-
-set __CommonMSBuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg!
-
-if %__EnforcePgo%==1 (
-    if %__BuildArchArm%==1 (
-        echo NOTICE: enforcepgo does nothing on arm architecture
-    )
-    if %__BuildArchArm64%==1 (
-        echo NOTICE: enforcepgo does nothing on arm64 architecture
-    )
-)
-
-REM Determine if this is a cross-arch build. Only do cross-arch build if we're also building native.
-
-if %__SkipCrossArchNative% EQU 0 (
-    if %__BuildNative% EQU 1 (
-        if %__BuildCrossArchNative% EQU 0 (
-            if /i not "%__BuildArch%"=="x86" (
-                REM Make recursive calls to build the cross OS DAC
-                call :BuildCrossOSDac -linuxdac
-                if not !errorlevel! == 0 (
-                    goto ExitWithError
-                )
-            )
-        )
-        if /i "%__BuildArch%"=="arm64" (
-            set __BuildCrossArchNative=1
-        )
-        if /i "%__BuildArch%"=="arm" (
-            set __BuildCrossArchNative=1
-        )
-    )
-)
-
-REM Set the remaining variables based upon the determined build configuration
-
-if %__PgoOptimize%==0 (
-    set __RestoreOptData=0
-)
-
-set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%"
-set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%"
-set "__ArtifactsIntermediatesDir=%__RepoRootDir%\artifacts\obj\coreclr\"
-if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__TargetOS%.%__BuildArch%.%__BuildType%")
-set "__PackagesBinDir=%__BinDir%\.nuget"
-set "__CrossComponentBinDir=%__BinDir%"
-set "__CrossCompIntermediatesDir=%__IntermediatesDir%\crossgen"
-set "__LogsDir=%__RootBinDir%\log\!__BuildType!"
-set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
-
-
-if NOT "%__CrossArch%" == "" set __CrossComponentBinDir=%__CrossComponentBinDir%\%__CrossArch%
-set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
-set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
-
-REM Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
-set "__CMakeBinDir=%__BinDir%"
-set "__CMakeBinDir=%__CMakeBinDir:\=/%"
-
-if not exist "%__BinDir%"              md "%__BinDir%"
-if not exist "%__IntermediatesDir%"    md "%__IntermediatesDir%"
-if not exist "%__LogsDir%"             md "%__LogsDir%"
-if not exist "%__MsbuildDebugLogsDir%" md "%__MsbuildDebugLogsDir%"
-
-if not exist "%__RootBinDir%\Directory.Build.props" copy %__ProjectDir%\EmptyProps.props %__RootBinDir%\Directory.Build.props
-if not exist "%__RootBinDir%\Directory.Build.targets" copy %__ProjectDir%\EmptyProps.props %__RootBinDir%\Directory.Build.targets
-
-REM Set up the directory for MSBuild debug logs.
-set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir%
-
-REM It is convenient to have your Nuget search path include the location where the build
-REM will place packages.  However nuget used during the build will fail if that directory
-REM does not exist.   Avoid this in at least one case by aggressively creating the directory.
-if not exist "%__BinDir%\.nuget\pkg"           md "%__BinDir%\.nuget\pkg"
-
-echo %__MsgPrefix%Commencing CoreCLR product build
-
-REM Set the remaining variables based upon the determined build configuration
-
-echo %__MsgPrefix%Checking prerequisites
-
-set __CMakeNeeded=1
-if %__BuildNative%==0 if %__BuildCrossArchNative%==0 if %__BuildNativeCoreLib%==0 if %__BuildTests%==0 set __CMakeNeeded=0
-if %__CMakeNeeded%==1 (
-    REM Eval the output from set-cmake-path.ps1
-    for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\set-cmake-path.ps1"""') do %%a
-    echo %__MsgPrefix%Using CMake from !CMakePath!
-)
-
-REM NumberOfCores is an WMI property providing number of physical cores on machine
-REM processor(s). It is used to set optimal level of CL parallelism during native build step
-if not defined NumberOfCores (
-    REM Determine number of physical processor cores available on machine
-    set TotalNumberOfCores=0
-    for /f "tokens=*" %%I in (
-        'wmic cpu get NumberOfCores /value ^| find "=" 2^>NUL'
-    ) do set %%I & set /a TotalNumberOfCores=TotalNumberOfCores+NumberOfCores
-    set NumberOfCores=!TotalNumberOfCores!
-)
-echo %__MsgPrefix%Number of processor cores %NumberOfCores%
-
-REM =========================================================================================
-REM ===
-REM === Start the build steps
-REM ===
-REM =========================================================================================
-
-@if defined _echo @echo on
-
-echo %__MsgPrefix%Generating native version headers
-set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
-    %__RepoRootDir%\eng\empty.csproj /t:GenerateRuntimeVersionFile /restore^
-    /p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
-    /p:RuntimeVersionFile="%__RootBinDir%\obj\coreclr\runtime_version.h"^
-    %__CommonMSBuildArgs% %__UnprocessedBuildArgs% /bl:!__BinLog!
-if not !errorlevel! == 0 (
-    echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to generate version headers.
-    echo !__BinLog!
-    set __exitCode=!errorlevel!
-    goto ExitWithCode
-)
-
-REM =========================================================================================
-REM ===
-REM === Restore optimization profile data
-REM ===
-REM =========================================================================================
-
-set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj
-if %__RestoreOptData% EQU 1 (
-    echo %__MsgPrefix%Restoring the OptimizationData Package
-    set "__BinLog=%__LogsDir%\OptRestore_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-
-    powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
-        %OptDataProjectFilePath% /t:Restore^
-        %__CommonMSBuildArgs% %__UnprocessedBuildArgs%^
-        /nodereuse:false /bl:!__BinLog!
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to restore the optimization data package.
-        echo !__BinLog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-)
-set __PgoOptDataPath=
-if %__PgoOptimize% EQU 1 (
-    set PgoDataPackagePathOutputFile="%__IntermediatesDir%\optdatapath.txt"
-    set "__BinLog=%__LogsDir%\PgoVersionRead_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-
-    REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
-    powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
-        "%OptDataProjectFilePath%" /t:DumpPgoDataPackagePath %__CommonMSBuildArgs% /bl:!__BinLog! /p:PgoDataPackagePathOutputFile="!PgoDataPackagePathOutputFile!"
-
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%Failed to get PGO data package path.
-        echo !__BinLog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-    if not exist "!PgoDataPackagePathOutputFile!" (
-        echo %__ErrMsgPrefix%Failed to get PGO data package path.
-        echo !__BinLog!
-        goto ExitWithError
-    )
-
-    set /p __PgoOptDataPath=<"!PgoDataPackagePathOutputFile!"
-)
-
-REM =========================================================================================
-REM ===
-REM === Generate source files for eventing
-REM ===
-REM =========================================================================================
-
-set __IntermediatesIncDir=%__IntermediatesDir%\src\inc
-set __IntermediatesEventingDir=%__ArtifactsIntermediatesDir%\Eventing\%__BuildArch%\%__BuildType%
-
-REM Find python and set it to the variable PYTHON
-set _C=-c "import sys; sys.stdout.write(sys.executable)"
-(py -3 %_C% || py -2 %_C% || python3 %_C% || python2 %_C% || python %_C%) > %TEMP%\pythonlocation.txt 2> NUL
-set _C=
-set /p PYTHON=<%TEMP%\pythonlocation.txt
-
-if NOT DEFINED PYTHON (
-    echo %__ErrMsgPrefix%%__MsgPrefix%Error: Could not find a python installation
-    goto ExitWithError
-)
-
-if %__BuildCoreLib% EQU 1 (
-    echo %__MsgPrefix%Laying out dynamically generated EventSource classes
-    "!PYTHON!" -B -Wall %__SourceDir%\scripts\genRuntimeEventSources.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate %__IntermediatesEventingDir% || goto ExitWithError
-)
-
-REM =========================================================================================
-REM ===
-REM === Build Cross-Architecture Native Components (if applicable)
-REM ===
-REM =========================================================================================
-
-if %__BuildCrossArchNative% EQU 1 (
-    REM Scope environment changes start {
-    setlocal
-
-    echo %__MsgPrefix%Commencing build of cross architecture native components for %__TargetOS%.%__BuildArch%.%__BuildType%
-
-    REM Set the environment for the cross-arch native build
-    set __VCBuildArch=x86_amd64
-    if /i "%__CrossArch%" == "x86" ( set __VCBuildArch=x86 )
-
-    echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
-    call                                 "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
-    @if defined _echo @echo on
-
-    if not exist "%__CrossCompIntermediatesDir%" md "%__CrossCompIntermediatesDir%"
-    if defined __SkipConfigure goto SkipConfigureCrossBuild
-
-    set __CMakeBinDir=%__CrossComponentBinDir%
-    set "__CMakeBinDir=!__CMakeBinDir:\=/!"
-    set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%"
-    call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs!
-
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project!
-        goto ExitWithError
-    )
-    @if defined _echo @echo on
-
-:SkipConfigureCrossBuild
-    if not exist "%__CrossCompIntermediatesDir%\CMakeCache.txt" (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: unable to find generated native component build project!
-        goto ExitWithError
-    )
-
-    if defined __ConfigureOnly goto SkipCrossCompBuild
-
-    set __BuildLogRootName=Cross
-    set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
-    set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn"
-    set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err"
-    set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-    set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!"
-    set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!"
-    set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!"
-    set "__MsbuildBinLog=/bl:!__BinLog!"
-    set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog!"
-
-    REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds.
-    "%CMakePath%" --build %__CrossCompIntermediatesDir% --target install --config %__BuildType% -- /nologo /m !__Logging!
-
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: cross-arch components build failed.
-        echo !__BinLog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-
-:SkipCrossCompBuild
-    REM } Scope environment changes end
-    endlocal
-)
-
-REM =========================================================================================
-REM ===
-REM === Build the CLR VM
-REM ===
-REM =========================================================================================
-
-if %__BuildNative% EQU 1 (
-    REM Scope environment changes start {
-    setlocal
-
-    echo %__MsgPrefix%Commencing build of native components for %__TargetOS%.%__BuildArch%.%__BuildType%
-
-    REM Set the environment for the native build
-    set __VCBuildArch=x86_amd64
-    if /i "%__BuildArch%" == "x86" ( set __VCBuildArch=x86 )
-    if /i "%__BuildArch%" == "arm" (
-        set __VCBuildArch=x86_arm
-        set ___CrossBuildDefine="-DCLR_CMAKE_CROSS_ARCH=1" "-DCLR_CMAKE_CROSS_HOST_ARCH=%__CrossArch%"
-    )
-    if /i "%__BuildArch%" == "arm64" (
-        set __VCBuildArch=x86_arm64
-        set ___CrossBuildDefine="-DCLR_CMAKE_CROSS_ARCH=1" "-DCLR_CMAKE_CROSS_HOST_ARCH=%__CrossArch%"
-    )
-
-    echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
-    call                                 "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
-    @if defined _echo @echo on
-
-    if not defined VSINSTALLDIR (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: VSINSTALLDIR variable not defined.
-        goto ExitWithError
-    )
-    if not exist "!VSINSTALLDIR!DIA SDK" goto NoDIA
-
-    if defined __SkipConfigure goto SkipConfigure
-
-    echo %__MsgPrefix%Regenerating the Visual Studio solution
-
-    set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" !___CrossBuildDefine! "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%"
-    call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project!
-        goto ExitWithError
-    )
-
-    @if defined _echo @echo on
-
-:SkipConfigure
-    if not exist "%__IntermediatesDir%\CMakeCache.txt" (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: unable to find generated native component build project!
-        goto ExitWithError
-    )
-
-    if defined __ConfigureOnly goto SkipNativeBuild
-
-    set __BuildLogRootName=CoreCLR
-    set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
-    set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn"
-    set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err"
-    set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-    set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!"
-    set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!"
-    set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!"
-    set "__MsbuildBinLog=/bl:!__BinLog!"
-    set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog!"
-
-    REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds.
-    "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /nologo /m !__Logging!
-
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: native component build failed.
-        echo !__BinLog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-
-:SkipNativeBuild
-    REM } Scope environment changes end
-    endlocal
-)
-
-REM =========================================================================================
-REM ===
-REM === CoreLib and NuGet package build section.
-REM ===
-REM =========================================================================================
-
-if %__BuildCoreLib% EQU 1 (
-    REM Scope environment changes start {
-    setlocal
-
-    echo %__MsgPrefix%Commencing build of System.Private.CoreLib for %__TargetOS%.%__BuildArch%.%__BuildType%
-    rem Explicitly set Platform causes conflicts in CoreLib project files. Clear it to allow building from VS x64 Native Tools Command Prompt
-    set Platform=
-
-    set __ExtraBuildArgs=
-
-    if "%__BuildManagedTools%" == "1" (
-        set __ExtraBuildArgs=!__ExtraBuildArgs! /p:BuildManagedTools=true
-    )
-
-    set __BuildLogRootName=System.Private.CoreLib
-    set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log"
-    set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn"
-    set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err"
-    set "__Binlog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-    set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!"
-    set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!"
-    set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!"
-    set "__MsbuildBinLog=/bl:!__Binlog!"
-    set "__Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! !__MsbuildBinLog!"
-
-    powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
-        %__ProjectDir%\src\build.proj /t:Restore^
-        /nodeReuse:false /p:PortableBuild=true /maxcpucount /p:IncludeRestoreOnlyProjects=true^
-        !__Logging! /bl: %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: Managed Product assemblies restore failed. Refer to the build log files for details.
-        echo     !__BuildLog!
-        echo     !__BuildWrn!
-        echo     !__BuildErr!
-        echo     !__Binlog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-
-    powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
-        %__ProjectDir%\src\build.proj /nodeReuse:false /p:PortableBuild=true /maxcpucount^
-        '!__MsbuildLog!' '!__MsbuildWrn!' '!__MsbuildErr!' %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: Managed Product assemblies build failed. Refer to the build log files for details.
-        echo     !__BuildLog!
-        echo     !__BuildWrn!
-        echo     !__BuildErr!
-        echo     !__Binlog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-
-    if "%__BuildManagedTools%" == "1" (
-        echo %__MsgPrefix%Publishing crossgen2...
-        call %__RepoRootDir%\dotnet.cmd publish --self-contained -r win-%__BuildArch% -c %__BuildType% -o "%__BinDir%\crossgen2" "%__ProjectDir%\src\tools\crossgen2\crossgen2\crossgen2.csproj" /nologo /p:TargetArchitecture=%__BuildArch%
-
-        if not !errorlevel! == 0 (
-            echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to build crossgen2.
-            echo     !__BuildLog!
-            echo     !__BuildWrn!
-            echo     !__BuildErr!
-            set __exitCode=!errorlevel!
-            goto ExitWithCode
-        )
-
-        copy /Y "%__BinDir%\clrjit.dll" "%__BinDir%\crossgen2\clrjitilc.dll"  | find /i /v "file(s) copied"
-        copy /Y "%__BinDir%\jitinterface.dll" "%__BinDir%\crossgen2\jitinterface.dll" | find /i /v "file(s) copied"
-    )
-    REM } Scope environment changes end
-    endlocal
-)
-
-REM =========================================================================================
-REM ===
-REM === Build native System.Private.CoreLib.
-REM ===
-REM =========================================================================================
-
-REM Scope environment changes start {
-setlocal
-
-REM Need diasymreader.dll on your path for /CreatePdb
-set PATH=%PATH%;%WinDir%\Microsoft.Net\Framework64\V4.0.30319;%WinDir%\Microsoft.Net\Framework\V4.0.30319
-
-if %__BuildNativeCoreLib% EQU 1 (
-    echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__TargetOS%.%__BuildArch%.%__BuildType%. Logging to "%__CrossGenCoreLibLog%".
-    if exist "%__CrossGenCoreLibLog%" del "%__CrossGenCoreLibLog%"
-
-    REM Need VS native tools environment for the **target** arch when running instrumented binaries
-    if %__PgoInstrument% EQU 1 (
-        set __VCExecArch=%__BuildArch%
-        if /i [%__BuildArch%] == [x64] set __VCExecArch=amd64
-        echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCExecArch!
-        call                                 "%__VCToolsRoot%\vcvarsall.bat" !__VCExecArch!
-        @if defined _echo @echo on
-        if NOT !errorlevel! == 0 (
-            echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to load native tools environment for !__VCExecArch!
-            goto ExitWithError
-        )
-
-        REM HACK: Workaround for [dotnet/coreclr#13970](https://github.com/dotnet/coreclr/issues/13970)
-        set __PgoRtPath=
-        for /f "tokens=*" %%f in ('where pgort*.dll') do (
-            if not defined __PgoRtPath set "__PgoRtPath=%%~f"
-        )
-        echo %__MsgPrefix%Copying "!__PgoRtPath!" into "%__BinDir%"
-        copy /y "!__PgoRtPath!" "%__BinDir%" || (
-            echo %__ErrMsgPrefix%%__MsgPrefix%Error: copy failed
-            goto ExitWithError
-        )
-        REM End HACK
-    )
-
-    if defined __CrossgenAltJit (
-        REM Set altjit flags for the crossgen run. Note that this entire crossgen section is within a setlocal/endlocal scope,
-        REM so we don't need to save or unset these afterwards.
-        echo %__MsgPrefix%Setting altjit environment variables for %__CrossgenAltJit%.
-        echo %__MsgPrefix%Setting altjit environment variables for %__CrossgenAltJit%. >> "%__CrossGenCoreLibLog%"
-        set COMPlus_AltJit=*
-        set COMPlus_AltJitNgen=*
-        set COMPlus_AltJitName=%__CrossgenAltJit%
-        set COMPlus_AltJitAssertOnNYI=1
-        set COMPlus_NoGuiOnAssert=1
-        set COMPlus_ContinueOnAssert=0
-    )
-
-    set NEXTCMD="%__CrossgenExe%" /nologo %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%\IL" /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll"
-    echo %__MsgPrefix%!NEXTCMD!
-    echo %__MsgPrefix%!NEXTCMD! >> "%__CrossGenCoreLibLog%"
-    !NEXTCMD! >> "%__CrossGenCoreLibLog%" 2>&1
-    if NOT !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: CrossGen System.Private.CoreLib build failed. Refer to %__CrossGenCoreLibLog%
-        REM Put it in the same log, helpful for Jenkins
-        type %__CrossGenCoreLibLog%
-        goto ExitWithError
-    )
-
-    set NEXTCMD="%__CrossgenExe%" /nologo /Platform_Assemblies_Paths "%__BinDir%" /CreatePdb "%__BinDir%\PDB" "%__BinDir%\System.Private.CoreLib.dll"
-    echo %__MsgPrefix%!NEXTCMD!
-    echo %__MsgPrefix%!NEXTCMD! >> "%__CrossGenCoreLibLog%"
-    !NEXTCMD! >> "%__CrossGenCoreLibLog%" 2>&1
-    if NOT !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: CrossGen /CreatePdb System.Private.CoreLib build failed. Refer to %__CrossGenCoreLibLog%
-        REM Put it in the same log, helpful for Jenkins
-        type %__CrossGenCoreLibLog%
-        goto ExitWithError
-    )
-)
-
-REM } Scope environment changes end
-endlocal
-
-REM =========================================================================================
-REM ===
-REM === Build packages
-REM ===
-REM =========================================================================================
-
-if %__BuildPackages% EQU 1 (
-    REM Scope environment changes start {
-    setlocal
-
-    echo %__MsgPrefix%Building Packages for %__TargetOS%.%__BuildArch%.%__BuildType%
-
-    set __BuildLog="%__LogsDir%\Nuget_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
-
-    REM The conditions as to what to build are captured in the builds file.
-    REM Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build
-    powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\build.ps1"^
-        -r -b -projects %__SourceDir%\.nuget\coreclr-packages.proj^
-        -verbosity minimal /clp:nosummary /nodeReuse:false /bl:!__BuildLog!^
-        /p:PortableBuild=true^
-        /p:Platform=%__BuildArch% %__CommonMSBuildArgs% %__UnprocessedBuildArgs%
-    if not !errorlevel! == 0 (
-        echo %__ErrMsgPrefix%%__MsgPrefix%Error: Nuget package generation failed. Refer to the build log file for details.
-        echo     !__BuildLog!
-        set __exitCode=!errorlevel!
-        goto ExitWithCode
-    )
-
-    REM } Scope environment changes end
-    endlocal
-)
-
-REM =========================================================================================
-REM ===
-REM === Test build section
-REM ===
-REM =========================================================================================
-
-if %__BuildTests% EQU 1 (
-    echo %__MsgPrefix%Commencing build of tests for %__TargetOS%.%__BuildArch%.%__BuildType%
-
-    set  __PriorityArg=
-    if defined __Priority (
-        set __PriorityArg=-priority=%__Priority%
-    )
-    set NEXTCMD=call %__ProjectDir%\build-test.cmd %__BuildArch% %__BuildType% !__PriorityArg! %__UnprocessedBuildArgs%
-    echo %__MsgPrefix%!NEXTCMD!
-    !NEXTCMD!
-
-    if not !errorlevel! == 0 (
-        REM buildtest.cmd has already emitted an error message and mentioned the build log file to examine.
-        goto ExitWithError
-    )
-) else if %__GenerateLayout% EQU 1 (
-    echo %__MsgPrefix%Generating layout for %__TargetOS%.%__BuildArch%.%__BuildType%
-
-    set NEXTCMD=call %__ProjectDir%\build-test.cmd %__BuildArch% %__BuildType% generatelayoutonly %__UnprocessedBuildArgs%
-    echo %__MsgPrefix%!NEXTCMD!
-    !NEXTCMD!
-
-    if not !errorlevel! == 0 (
-        REM runtest.cmd has already emitted an error message and mentioned the build log file to examine.
-        goto ExitWithError
-    )
-)
-
-REM =========================================================================================
-REM ===
-REM === All builds complete!
-REM ===
-REM =========================================================================================
-
-echo %__MsgPrefix%Build succeeded.  Finished at %TIME%
-echo %__MsgPrefix%Product binaries are available at !__BinDir!
-exit /b 0
-
-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%
-    goto ExitWithError
-)
-
-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 not !errorlevel! == 0 (
-    echo %__MsgPrefix%    %__BuildArch% %__BuildType% %__PassThroughArgs% >> %__BuildResultFile%
-    set __AllBuildSuccess=false
-)
-
-
-echo %__MsgPrefix%WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.cmd script.
-echo %__MsgPrefix%See https://github.com/dotnet/runtime/issues/32991 for more information.
-
-exit /b 0
-
-REM =========================================================================================
-REM ===
-REM === Helper routines
-REM ===
-REM =========================================================================================
-
-
-REM =========================================================================================
-REM === These two routines are intended for the exit code to propagate to the parent process
-REM === Like MSBuild or Powershell. If we directly exit /b 1 from within a if statement in
-REM === any of the routines, the exit code is not propagated.
-REM =========================================================================================
-:ExitWithError
-echo %__MsgPrefix%WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.cmd script.
-echo %__MsgPrefix%See https://github.com/dotnet/runtime/issues/32991 for more information.
-exit /b 1
-
-:ExitWithCode
-echo %__MsgPrefix%WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.cmd script.
-echo %__MsgPrefix%See https://github.com/dotnet/runtime/issues/32991 for more information.
-exit /b !__exitCode!
-
-:BuildCrossOSDac
-setlocal
-set __BuildDacOption=%1
-set __NextCmd=call %__ThisScriptFull% %__BuildDacOption% %__BuildArch% %__BuildType% %__PassThroughArgs%
-echo %__MsgPrefix%Invoking: %__NextCmd%
-%__NextCmd%
-if not !errorlevel! == 0 (
-    echo %__MsgPrefix%    %__BuildDacOption% %__BuildArch% %__BuildType% %__PassThroughArgs%
-    endlocal
-    goto ExitWithError
-)
-endlocal
-exit /b 0
-
-:Usage
-echo.
-echo Build the CoreCLR repo.
-echo.
-echo Usage:
-echo     build.cmd [option1] [option2]
-echo or:
-echo     build.cmd all [option1] [option2]
-echo.
-echo All arguments are optional. The options are:
-echo.
-echo.-? -h -help --help: view this message.
-echo -all: Builds all configurations and platforms.
-echo Build architecture: one of -x64, -x86, -arm, -arm64 ^(default: -x64^).
-echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^).
-echo mscorlib version: one of -freebsdmscorlib, -linuxmscorlib, -netbsdmscorlib, -osxmscorlib,
-echo     or -windowsmscorlib. If one of these is passed, only System.Private.CoreLib is built,
-echo     for the specified platform ^(FreeBSD, Linux, NetBSD, OS X or Windows,
-echo     respectively^).
-echo     add nativemscorlib to go further and build the native image for designated mscorlib.
-echo -nopgooptimize: do not use profile guided optimizations.
-echo -enforcepgo: verify after the build that PGO was used for key DLLs, and fail the build if not
-echo -pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.
-echo -ibcinstrument: generate IBC-tuning-enabled native images when invoking crossgen.
-echo -configureonly: skip all builds; only run CMake ^(default: CMake and builds are run^)
-echo -alpinedac: Build a linux musl DAC with minimal support for printing exceptions in a dump on a windows host.
-echo -linuxdac: Build a linux DAC with minimal support for printing exceptions in a dump on a windows host.
-
-echo -skipconfigure: skip CMake ^(default: CMake is run^)
-echo -skipmscorlib: skip building System.Private.CoreLib ^(default: System.Private.CoreLib is built^).
-echo -skipnative: skip building native components ^(default: native components are built^).
-echo -skipcrossarchnative: skip building cross-architecture native components ^(default: components are built^).
-echo -skiptests: skip building tests ^(default: tests are built^).
-echo -skipbuildpackages: skip building nuget packages ^(default: packages are built^).
-echo -skipmanagedtools: skip build tools such as R2R dump and RunInContext
-echo -skiprestoreoptdata: skip restoring optimization data used by profile-based optimizations.
-echo -skiprestore: skip restoring packages ^(default: packages are restored during build^).
-echo -disableoss: Disable Open Source Signing for System.Private.CoreLib.
-echo -priority=^<N^> : specify a set of test that will be built and run, with priority N.
-echo -officialbuildid=^<ID^>: specify the official build ID to be used by this build.
-echo -crossgenaltjit ^<JIT dll^>: run crossgen using specified altjit ^(used for JIT testing^).
-echo portable : build for portable RID.
-echo.
-echo If "all" is specified, then all build architectures and types are built. If, in addition,
-echo one or more build architectures or types is specified, then only those build architectures
-echo and types are built.
-echo.
-echo For example:
-echo     build -all
-echo        -- builds all architectures, and all build types per architecture
-echo     build -all -x86
-echo        -- builds all build types for x86
-echo     build -all -x64 -x86 -Checked -Release
-echo        -- builds x64 and x86 architectures, Checked and Release build types for each
-exit /b 1
-
-:NoDIA
-echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
-Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^
-Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^
-Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^
-may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again.
-exit /b 1
diff --git a/src/coreclr/build.sh b/src/coreclr/build.sh
deleted file mode 100755 (executable)
index 634bcb7..0000000
+++ /dev/null
@@ -1,553 +0,0 @@
-#!/usr/bin/env bash
-
-# resolve python-version to use
-if [[ -z "$PYTHON" ]]; then
-    if ! PYTHON=$(command -v python3 || command -v python2 || command -v python || command -v py)
-    then
-       echo "Unable to locate build-dependency python!" 1>&2
-       exit 1
-    fi
-fi
-# validate python-dependency
-# useful in case of explicitly set option.
-if ! command -v "$PYTHON" > /dev/null
-then
-   echo "Unable to locate build-dependency python ($PYTHON)!" 1>&2
-   exit 1
-fi
-
-export PYTHON
-
-usage_list=("-crossgenonly: only run native image generation.")
-usage_list+=("-disableoss: Disable Open Source Signing for System.Private.CoreLib.")
-usage_list+=("-ibcinstrument: generate IBC-tuning-enabled native images when invoking crossgen.")
-usage_list+=("-nopgooptimize: do not use profile guided optimizations.")
-usage_list+=("-officialbuildid=^<ID^>: specify the official build ID to be used by this build.")
-usage_list+=("-partialngen: build CoreLib as PartialNGen.")
-usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.")
-usage_list+=("-skipcrossgen: skip native image generation.")
-usage_list+=("-skipcrossarchnative: Disable Open Source Signing for System.Private.CoreLib.")
-usage_list+=("-skipmanagedtools: generate instrumented code for profile guided optimization enabled binaries.")
-usage_list+=("-skipmscorlib: generate IBC-tuning-enabled native images when invoking crossgen.")
-usage_list+=("-skipnuget: skip NuGet package generation.")
-usage_list+=("-skiprestore: specify the official build ID to be used by this build.")
-usage_list+=("-skiprestoreoptdata: build CoreLib as PartialNGen.")
-usage_list+=("-staticanalyzer: skip native image generation.")
-
-setup_dirs_local()
-{
-    setup_dirs
-
-    mkdir -p "$__LogsDir"
-    mkdir -p "$__MsbuildDebugLogsDir"
-
-    if [[ "$__CrossBuild" == 1 ]]; then
-        mkdir -p "$__CrossComponentBinDir"
-    fi
-}
-
-restore_optdata()
-{
-    local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
-    if [[ "$__SkipRestoreOptData" == 0 && "$__IsMSBuildOnNETCoreSupported" == 1 ]]; then
-        echo "Restoring the OptimizationData package"
-        "$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary $__ArcadeScriptArgs \
-                                               $OptDataProjectFilePath /t:Restore /m \
-                                               -bl:"$__LogsDir/OptRestore_$__ConfigTriplet.binlog"\
-                                               $__CommonMSBuildArgs $__UnprocessedBuildArgs \
-                                               /nodereuse:false
-        local exit_code="$?"
-        if [[ "$exit_code" != 0 ]]; then
-            echo "${__ErrMsgPrefix}Failed to restore the optimization data package."
-            exit "$exit_code"
-        fi
-    fi
-
-    if [[ "$__PgoOptimize" == 1 && "$__IsMSBuildOnNETCoreSupported" == 1 ]]; then
-        # Parse the optdata package versions out of msbuild so that we can pass them on to CMake
-
-        local PgoDataPackagePathOutputFile="${__IntermediatesDir}/optdatapath.txt"
-
-        # Writes into ${PgoDataPackagePathOutputFile}
-        "$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary $__ArcadeScriptArgs $OptDataProjectFilePath /t:DumpPgoDataPackagePath\
-                                             ${__CommonMSBuildArgs} /p:PgoDataPackagePathOutputFile=${PgoDataPackagePathOutputFile} \
-                                             -bl:"$__LogsDir/PgoVersionRead_$__ConfigTriplet.binlog" > /dev/null 2>&1
-        local exit_code="$?"
-        if [[ "$exit_code" != 0 || ! -f "${PgoDataPackagePathOutputFile}" ]]; then
-            echo "${__ErrMsgPrefix}Failed to get PGO data package path."
-            exit "$exit_code"
-        fi
-
-        __PgoOptDataPath=$(<"${PgoDataPackagePathOutputFile}")
-    fi
-}
-
-generate_event_logging_sources()
-{
-    __OutputEventingDir="$1"
-
-    __PythonWarningFlags="-Wall"
-    if [[ "$__IgnoreWarnings" == 0 ]]; then
-        __PythonWarningFlags="$__PythonWarningFlags -Werror"
-    fi
-
-    echo "Laying out dynamically generated EventSource classes"
-    "$PYTHON" -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genRuntimeEventSources.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__OutputEventingDir"
-}
-
-generate_event_logging()
-{
-    # Event Logging Infrastructure
-    if [[ "$__SkipMSCorLib" == 0 ]]; then
-        generate_event_logging_sources "$__ArtifactsIntermediatesDir/Eventing/$__BuildArch/$__BuildType"
-    fi
-}
-
-build_cross_architecture_components()
-{
-    local intermediatesForBuild="$__IntermediatesDir/Host$__CrossArch/crossgen"
-    local crossArchBinDir="$__BinDir/$__CrossArch"
-
-    mkdir -p "$intermediatesForBuild"
-    mkdir -p "$crossArchBinDir"
-
-    generate_event_logging_sources "$intermediatesForBuild" "the crossarch build system"
-
-    __SkipCrossArchBuild=1
-    # check supported cross-architecture components host(__HostArch)/target(__BuildArch) pair
-    if [[ ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") && ("$__CrossArch" == "x86" || "$__CrossArch" == "x64") ]]; then
-        __SkipCrossArchBuild=0
-    elif [[ "$__BuildArch" == "arm64" && "$__CrossArch" == "x64" ]]; then
-        __SkipCrossArchBuild=0
-    else
-        # not supported
-        return
-    fi
-
-    __CMakeBinDir="$crossArchBinDir"
-    CROSSCOMPILE=0
-    export __CMakeBinDir CROSSCOMPILE
-
-    __CMakeArgs="-DCLR_CMAKE_TARGET_ARCH=$__BuildArch -DCLR_CROSS_COMPONENTS_BUILD=1 $__CMakeArgs"
-    build_native "$__CrossArch" "$__ProjectRoot" "$__ProjectRoot" "$intermediatesForBuild" "cross-architecture components"
-
-    CROSSCOMPILE=1
-    export CROSSCOMPILE
-}
-
-build_CoreLib_ni()
-{
-    local __CrossGenExec=$1
-    local __CoreLibILDir=$2
-
-    if [[ "$__PartialNgen" == 1 ]]; then
-        COMPlus_PartialNGen=1
-        export COMPlus_PartialNGen
-    fi
-
-    if [[ -e "$__CrossGenCoreLibLog" ]]; then
-        rm "$__CrossGenCoreLibLog"
-    fi
-    echo "Generating native image of System.Private.CoreLib.dll for $__TargetOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"."
-    echo "$__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll"
-    "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1
-    local exit_code="$?"
-    if [[ "$exit_code" != 0 ]]; then
-        echo "${__ErrMsgPrefix}Failed to generate native image for System.Private.CoreLib. Refer to $__CrossGenCoreLibLog"
-        exit "$exit_code"
-    fi
-
-    if [[ "$__TargetOS" == "Linux" ]]; then
-        echo "Generating symbol file for System.Private.CoreLib.dll"
-        echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll"
-        "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1
-        local exit_code="$?"
-        if [[ "$exit_code" != 0 ]]; then
-            echo "${__ErrMsgPrefix}Failed to generate symbol file for System.Private.CoreLib. Refer to $__CrossGenCoreLibLog"
-            exit "$exit_code"
-        fi
-    fi
-}
-
-build_CoreLib()
-{
-    if [[ "$__IsMSBuildOnNETCoreSupported" == 0 ]]; then
-        echo "System.Private.CoreLib.dll build unsupported."
-        return
-    fi
-
-    if [[ "$__SkipMSCorLib" == 1 ]]; then
-       echo "Skipping building System.Private.CoreLib."
-       return
-    fi
-
-    echo "Commencing build of managed components for $__TargetOS.$__BuildArch.$__BuildType"
-
-    # Invoke MSBuild
-    __ExtraBuildArgs=""
-
-    if [[ "$__BuildManagedTools" -eq "1" ]]; then
-        __ExtraBuildArgs="$__ExtraBuildArgs /p:BuildManagedTools=true"
-    fi
-
-    "$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary $__ArcadeScriptArgs \
-                                           $__ProjectDir/src/build.proj /t:Restore \
-                                           /p:PortableBuild=true /maxcpucount /p:IncludeRestoreOnlyProjects=true \
-                                           /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__ConfigTriplet.log \
-                                           -bl:"$__LogsDir/System.Private.CoreLib_$__ConfigTriplet.binlog" \
-                                           /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \
-                                           $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
-
-    local exit_code="$?"
-    if [[ "$exit_code" != 0 ]]; then
-        echo "${__ErrMsgPrefix}Failed to restore managed components."
-        exit "$exit_code"
-    fi
-
-    "$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary $__ArcadeScriptArgs \
-                                           $__ProjectDir/src/build.proj \
-                                           /p:PortableBuild=true /maxcpucount \
-                                           /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__TargetOS__$__BuildArch__$__BuildType.log \
-                                           -bl:"$__LogsDir/System.Private.CoreLib_$__ConfigTriplet.binlog" \
-                                           /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \
-                                           $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
-
-    local exit_code="$?"
-        if [[ "$exit_code" != 0 ]]; then
-        echo "${__ErrMsgPrefix}Failed to build managed components."
-        exit "$exit_code"
-    fi
-
-    if [[ "$__BuildManagedTools" -eq "1" ]]; then
-        echo "Publishing crossgen2 for $__DistroRid"
-        "$__RepoRootDir/dotnet.sh" publish --self-contained -r $__DistroRid -c $__BuildType -o "$__BinDir/crossgen2" "$__ProjectRoot/src/tools/crossgen2/crossgen2/crossgen2.csproj" /nologo /p:TargetArchitecture=$__BuildArch
-
-        local exit_code="$?"
-        if [[ "$exit_code" != 0 ]]; then
-            echo "${__ErrMsgPrefix}Failed to build crossgen2."
-            exit "$exit_code"
-        fi
-
-        if [[ "$__HostOS" == "OSX" ]]; then
-            cp "$__BinDir/libclrjit.dylib" "$__BinDir/crossgen2/libclrjitilc.dylib"
-            cp "$__BinDir/libjitinterface.dylib" "$__BinDir/crossgen2/libjitinterface.dylib"
-        else
-            cp "$__BinDir/libclrjit.so" "$__BinDir/crossgen2/libclrjitilc.so"
-            cp "$__BinDir/libjitinterface.so" "$__BinDir/crossgen2/libjitinterface.so"
-        fi
-    fi
-
-    local __CoreLibILDir="$__BinDir"/IL
-
-    if [[ "$__SkipCrossgen" == 1 ]]; then
-        echo "Skipping generating native image"
-
-        if [[ "$__CrossBuild" == 1 ]]; then
-            # Crossgen not performed, so treat the IL version as the final version
-            cp "$__CoreLibILDir"/System.Private.CoreLib.dll "$__BinDir"/System.Private.CoreLib.dll
-        fi
-
-        return
-    fi
-
-    # The cross build generates a crossgen with the target architecture.
-    if [[ "$__CrossBuild" == 0 ]]; then
-       if [[ "$__SkipCoreCLR" == 1 ]]; then
-           return
-       fi
-
-       # The architecture of host pc must be same architecture with target.
-       if [[ "$__HostArch" == "$__BuildArch" ]]; then
-           build_CoreLib_ni "$__BinDir/crossgen" "$__CoreLibILDir"
-       elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "x86" ) ]]; then
-           build_CoreLib_ni "$__BinDir/crossgen" "$__CoreLibILDir"
-       elif [[ ( "$__HostArch" == "arm64" ) && ( "$__BuildArch" == "arm" ) ]]; then
-           build_CoreLib_ni "$__BinDir/crossgen" "$__CoreLibILDir"
-       else
-           exit 1
-       fi
-    else
-       if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" ) ]]; then
-           build_CoreLib_ni "$__CrossComponentBinDir/crossgen" "$__CoreLibILDir"
-       elif [[ ( "$__CrossArch" == "x64" ) && ( "$__BuildArch" == "arm" ) ]]; then
-           build_CoreLib_ni "$__CrossComponentBinDir/crossgen" "$__CoreLibILDir"
-       elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "arm64" ) ]]; then
-           build_CoreLib_ni "$__CrossComponentBinDir/crossgen" "$__CoreLibILDir"
-       else
-           # Crossgen not performed, so treat the IL version as the final version
-           cp "$__CoreLibILDir"/System.Private.CoreLib.dll "$__BinDir"/System.Private.CoreLib.dll
-       fi
-    fi
-}
-
-generate_NugetPackages()
-{
-    # We can only generate nuget package if we also support building mscorlib as part of this build.
-    if [[ "$__IsMSBuildOnNETCoreSupported" == 0 ]]; then
-        echo "Nuget package generation unsupported."
-        return
-    fi
-
-    # Since we can build mscorlib for this OS, did we build the native components as well?
-    if [[ "$__SkipCoreCLR" == 1 && "$__CrossgenOnly" == 0 ]]; then
-        echo "Unable to generate nuget packages since native components were not built."
-        return
-    fi
-
-    echo "Generating nuget packages for $__TargetOS"
-    echo "DistroRid is $__DistroRid"
-    echo "ROOTFS_DIR is $ROOTFS_DIR"
-    # Build the packages
-    # Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build
-    "$__RepoRootDir"/eng/common/build.sh -r -b -projects "$__SourceDir"/.nuget/coreclr-packages.proj \
-                                       -verbosity minimal -bl:"$__LogsDir/Nuget_$__TargetOS__$__BuildArch__$__BuildType.binlog" \
-                                       /p:PortableBuild=true \
-                                       /p:"__IntermediatesDir=$__IntermediatesDir" /p:"__RootBinDir=$__RootBinDir" /p:"__DoCrossArchBuild=$__CrossBuild" \
-                                       $__CommonMSBuildArgs $__UnprocessedBuildArgs
-
-    local exit_code="$?"
-    if [[ "$exit_code" != 0 ]]; then
-        echo "${__ErrMsgPrefix}Failed to generate Nuget packages."
-        exit "$exit_code"
-    fi
-}
-
-handle_arguments_local() {
-    case "$1" in
-        crossgenonly|-crossgenonly)
-            __SkipMSCorLib=1
-            __SkipCoreCLR=1
-            __CrossgenOnly=1
-            ;;
-
-        disableoss|-disableoss)
-            __SignTypeArg="/p:SignType=real"
-            ;;
-
-        ibcinstrument|-ibcinstrument)
-            __IbcTuning="/Tuning"
-            ;;
-
-        ignorewarnings|-ignorewarnings)
-            __IgnoreWarnings=1
-            __CMakeArgs="-DCLR_CMAKE_WARNINGS_ARE_ERRORS=OFF $__CMakeArgs"
-            ;;
-
-        nopgooptimize|-nopgooptimize)
-            __PgoOptimize=0
-            __SkipRestoreOptData=1
-            ;;
-
-        officialbuildid=*|-officialbuildid=*)
-            __Id=$(echo "$1" | cut -d'=' -f 2)
-            __OfficialBuildIdArg="/p:OfficialBuildId=$__Id"
-            ;;
-
-        partialngen|-partialngen)
-            __PartialNgen=1
-            ;;
-
-        pgoinstrument|-pgoinstrument)
-            __PgoInstrument=1
-            ;;
-
-        skipcoreclr|-skipcoreclr)
-            # Accept "skipcoreclr" for backwards-compatibility.
-            __SkipCoreCLR=1
-            ;;
-
-        skipcrossarchnative|-skipcrossarchnative)
-            __SkipCrossArchNative=1
-            ;;
-
-        skipcrossgen|-skipcrossgen)
-            __SkipCrossgen=1
-            ;;
-
-        skipmanagedtools|-skipmanagedtools)
-            __BuildManagedTools=0
-            ;;
-
-        skipmscorlib|-skipmscorlib)
-            __SkipMSCorLib=1
-            ;;
-
-        skipnuget|-skipnuget|skipbuildpackages|-skipbuildpackages)
-            __SkipNuget=1
-            ;;
-
-        skiprestore|-skiprestore)
-            __SkipRestoreArg="/p:RestoreDuringBuild=false"
-            ;;
-
-        staticanalyzer|-staticanalyzer)
-            __StaticAnalyzer=1
-            ;;
-
-        *)
-            __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
-            ;;
-    esac
-}
-
-echo "Commencing CoreCLR Repo build"
-echo "WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.sh script."
-echo "See https://github.com/dotnet/runtime/issues/32991 for more information."
-
-# Argument types supported by this script:
-#
-# Build architecture - valid values are: x64, ARM.
-# Build Type         - valid values are: Debug, Checked, Release
-#
-# Set the default arguments for build
-
-# Obtain the location of the bash script to figure out where the root of the repo is.
-__ProjectRoot="$(cd "$(dirname "$0")"; pwd -P)"
-__RepoRootDir="$(cd "$__ProjectRoot"/../..; pwd -P)"
-
-__BuildArch=
-__BuildType=Debug
-__CodeCoverage=0
-__IgnoreWarnings=0
-
-# Set the various build properties here so that CMake and MSBuild can pick them up
-__BuildManagedTools=1
-__Compiler=clang
-__CompilerMajorVersion=
-__CompilerMinorVersion=
-__CommonMSBuildArgs=
-__ConfigureOnly=0
-__CrossBuild=0
-__CrossgenOnly=0
-__DistroRid=""
-__IbcOptDataPath=""
-__IbcTuning=""
-__IsMSBuildOnNETCoreSupported=0
-__MSBCleanBuildArgs=
-__OfficialBuildIdArg=""
-__PartialNgen=0
-__PgoInstrument=0
-__PgoOptDataPath=""
-__PgoOptimize=1
-__PortableBuild=1
-__ProjectDir="$__ProjectRoot"
-__RootBinDir="$__RepoRootDir/artifacts"
-__SignTypeArg=""
-__SkipConfigure=0
-__SkipCoreCLR=0
-__SkipCrossArchNative=0
-__SkipCrossgen=0
-__SkipGenerateVersion=0
-__SkipMSCorLib=0
-__SkipManaged=0
-__SkipNuget=0
-__SkipRestore=""
-__SkipRestoreArg="/p:RestoreDuringBuild=true"
-__SkipRestoreOptData=0
-__SourceDir="$__ProjectDir/src"
-__StaticAnalyzer=0
-__UnprocessedBuildArgs=
-__UseNinja=0
-__VerboseBuild=0
-__ValidateCrossArg=1
-__CMakeArgs=""
-
-source "$__ProjectRoot"/_build-commons.sh
-
-if [[ "${__BuildArch}" != "${__HostArch}" ]]; then
-    __CrossBuild=1
-fi
-
-# Set dependent variables
-__LogsDir="$__RootBinDir/log/$__BuildType"
-__MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
-__ConfigTriplet=$__TargetOS__$__BuildArch__$__BuildType
-
-# Set the remaining variables based upon the determined build configuration
-__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType"
-__PackagesBinDir="$__BinDir/.nuget"
-__IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType"
-__ArtifactsIntermediatesDir="$__RepoRootDir/artifacts/obj/coreclr"
-export __IntermediatesDir __ArtifactsIntermediatesDir
-
-__CrossComponentBinDir="$__BinDir"
-
-__CrossArch="$__HostArch"
-if [[ "$__CrossBuild" == 1 ]]; then
-    __CrossComponentBinDir="$__CrossComponentBinDir/$__CrossArch"
-fi
-__CrossGenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__ConfigTriplet.log"
-
-# CI_SPECIFIC - On CI machines, $HOME may not be set. In such a case, create a subfolder and set the variable to set.
-# This is needed by CLI to function.
-if [[ -z "$HOME" ]]; then
-    if [[ ! -d "$__ProjectDir/temp_home" ]]; then
-        mkdir temp_home
-    fi
-    HOME="$__ProjectDir"/temp_home
-    export HOME
-    echo "HOME not defined; setting it to $HOME"
-fi
-
-# Specify path to be set for CMAKE_INSTALL_PREFIX.
-# This is where all built CoreClr libraries will copied to.
-__CMakeBinDir="$__BinDir"
-export __CMakeBinDir
-
-# Make the directories necessary for build if they don't exist
-setup_dirs_local
-
-# Set up the directory for MSBuild debug logs.
-MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
-export MSBUILDDEBUGPATH
-
-# Check prereqs.
-check_prereqs
-
-# Restore the package containing profile counts for profile-guided optimizations
-restore_optdata
-
-# Generate event logging infrastructure sources
-generate_event_logging
-
-# Build the coreclr (native) components.
-__CMakeArgs="-DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_PATH=$__PgoOptDataPath -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize -DCLR_REPO_ROOT_DIR=\"$__RepoRootDir\" $__CMakeArgs"
-
-if [[ "$__SkipConfigure" == 0 && "$__CodeCoverage" == 1 ]]; then
-    __CMakeArgs="-DCLR_CMAKE_ENABLE_CODE_COVERAGE=1 $__CMakeArgs"
-fi
-
-if [[ "$__SkipCoreCLR" == 1 ]]; then
-    echo "Skipping CoreCLR component build."
-else
-    build_native "$__BuildArch" "$__ProjectRoot" "$__ProjectRoot" "$__IntermediatesDir" "CoreCLR component"
-fi
-
-# Build cross-architecture components
-if [[ "$__SkipCrossArchNative" != 1 ]]; then
-    if [[ "$__CrossBuild" == 1 ]]; then
-        build_cross_architecture_components
-    fi
-fi
-
-# Build System.Private.CoreLib.
-
-build_CoreLib
-
-if [[ "$__CrossgenOnly" == 1 ]]; then
-    build_CoreLib_ni "$__BinDir/crossgen"
-fi
-
-# Generate nuget packages
-if [[ "$__SkipNuget" != 1 ]]; then
-    generate_NugetPackages
-fi
-
-
-# Build complete
-
-echo "Repo successfully built."
-echo "Product binaries are available at $__BinDir"
-echo "WARNING: This build script is deprecated and will be deleted soon. Use the root build script to build CoreCLR. If you want to build the CoreCLR runtime without using MSBuild, use the build-native.sh script."
-echo "See https://github.com/dotnet/runtime/issues/32991 for more information."
-exit 0
diff --git a/src/coreclr/src/build.proj b/src/coreclr/src/build.proj
deleted file mode 100644 (file)
index 9765435..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<Project Sdk="Microsoft.Build.Traversal">
-
-  <!-- List the projects that need to be restored only -->
- <ItemGroup Condition="'$(IncludeRestoreOnlyProjects)' == 'true'">
-    <ProjectReference Condition="'$(Configuration)'=='Release'" Include="$(SourceDir).nuget/optdata/optdata.csproj" />
- </ItemGroup>
-
-  <!-- List the projects that need to be built -->
-  <ItemGroup>
-    <ProjectReference Condition="'$(BuildManagedTools)' == 'true'" Include="tools/runincontext/runincontext.csproj" />
-    <ProjectReference Condition="'$(BuildManagedTools)' == 'true'" Include="tools/r2rdump/R2RDump.csproj" />
-    <ProjectReference Condition="'$(BuildManagedTools)' == 'true'" Include="tools/r2rtest/R2RTest.csproj" />
-    <ProjectReference Include="System.Private.CoreLib\System.Private.CoreLib.csproj" />
-  </ItemGroup>
-
-  <!-- Copy the UCRT files from the windows kit directory to the local directory.
-       The api-*xstate.dll binary needs to be signed. -->
-  <Target Name="CopyUcrtFiles" AfterTargets="Build">
-    <ItemGroup>
-      <UcrtFilesToCopy Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(TargetArchitecture)\*.dll" />
-    </ItemGroup>
-
-    <Copy Condition="'$(TargetArchitecture)' != 'arm64'"
-        SourceFiles="@(UcrtFilesToCopy)"
-        DestinationFolder="$(BinDir)Redist\ucrt\DLLs\$(TargetArchitecture)" />
-  </Target>
-
-  <PropertyGroup>
-    <RunEnforcePGO Condition="$(__EnforcePgo) == '1'">true</RunEnforcePGO>
-    <RunEnforcePGO Condition="$(TargetArchitecture) == 'arm' OR $(TargetArchitecture) == 'arm64'">false</RunEnforcePGO>
-  </PropertyGroup>
-
-  <Target Name="EnforcePGO" Condition="$(RunEnforcePGO) == 'true'" AfterTargets="Build">
-    <ItemGroup>
-      <PGOEnforcedFiles Include="$(BinDir)coreclr.dll" />
-      <PGOEnforcedFiles Include="$(BinDir)clrjit.dll" />
-    </ItemGroup>
-
-    <Message Text="Checking if the following DLLs are properly compiled with PGO" Importance="High" />
-    <Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)scripts\pgocheck.py @(PGOEnforcedFiles)" />
-  </Target>
-</Project>