Skip to content

Commit

Permalink
Consolidation resiliency fixes in CoreCLR build scripts (dotnet/corec…
Browse files Browse the repository at this point in the history
…lr#27635)

Backport of my consolidation changes aimed at making principal
CoreCLR build scripts orthogonal to repo consolidation.

Thanks

Tomas


Commit migrated from dotnet/coreclr@3eea5cd
  • Loading branch information
trylek authored Nov 4, 2019
1 parent ce3239a commit a9c7356
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 41 deletions.
8 changes: 6 additions & 2 deletions src/coreclr/build-packages.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
setlocal EnableDelayedExpansion

set "__ProjectDir=%~dp0"
set "__RepoRootDir=%~dp0..\..\"

rem Remove after repo consolidation
if not exist "%__RepoRootDir%\.dotnet-runtime-placeholder" ( set "__RepoRootDir=!__ProjectDir!" )

set "__args=%*"
set processedArgs=
Expand Down Expand Up @@ -33,8 +37,8 @@ if [!processedArgs!]==[] (

:ArgsDone

set logFile=%__ProjectDir%bin\Logs\build-packages.binlog
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%eng\common\build.ps1"^
set logFile=%__RepoRootDir%bin\Logs\build-packages.binlog
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%eng\common\build.ps1"^
-r -b -projects %__ProjectDir%src\.nuget\packages.builds^
-verbosity minimal /bl:%logFile% /nodeReuse:false^
/p:__BuildOS=Windows_NT^
Expand Down
12 changes: 10 additions & 2 deletions src/coreclr/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ usage()

initDistroRid()
{
source init-distro-rid.sh
source ${__ProjectRoot}/init-distro-rid.sh

local passedRootfsDir=""

Expand All @@ -25,6 +25,14 @@ initDistroRid()
}

__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
__RepoRootDir=${__ProjectRoot}/../..

# BEGIN SECTION to remove after repo consolidation
if [ ! -f "${__RepoRootDir}/.dotnet-runtime-placeholder" ]; then
__RepoRootDir=${__ProjectRoot}
fi
# END SECTION to remove after repo consolidation

__IsPortableBuild=1
__CrossBuild=0

Expand Down Expand Up @@ -126,7 +134,7 @@ if [ "${__DistroRid}" = "linux-musl-arm64" ]; then
fi

logFile=$__ProjectRoot/bin/Logs/build-packages.binlog
$__ProjectRoot/eng/common/build.sh -r -b -projects $__ProjectRoot/src/.nuget/packages.builds \
$__RepoRootDir/eng/common/build.sh -r -b -projects $__ProjectRoot/src/.nuget/packages.builds \
-verbosity minimal -bl:$logFile \
/p:__BuildOS=$__BuildOS \
/p:PortableBuild=true /p:__DistroRid=$__DistroRid \
Expand Down
15 changes: 10 additions & 5 deletions src/coreclr/build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ set __BuildOS=Windows_NT
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__RepoRootDir=%__ProjectDir%\..\.."

rem Remove after repo consolidation
if not exist "%__RepoRootDir%\.dotnet-runtime-placeholder" ( set "__RepoRootDir=!__ProjectDir!" )

set "__TestDir=%__ProjectDir%\tests"
set "__ProjectFilesDir=%__TestDir%"
set "__SourceDir=%__ProjectDir%\src"
Expand Down Expand Up @@ -283,7 +288,7 @@ set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging='!__MsbuildLog!' '!__MsbuildWrn!' '!__MsbuildErr!'

REM Disable warnAsError - coreclr issue 19922
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\tests\build.proj -warnAsError:0 /t:BatchRestorePackages /nodeReuse:false^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
Expand Down Expand Up @@ -329,7 +334,7 @@ set __NumberOfTestGroups=3
if %__Priority% GTR 0 (set __NumberOfTestGroups=10)
echo %__MsgPrefix%Building tests divided into %__NumberOfTestGroups% test groups

set __CommonMSBuildCmdPrefix=powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "!__ProjectDir!\eng\common\msbuild.ps1" !__ArcadeScriptArgs!
set __CommonMSBuildCmdPrefix=powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "!__RepoRootDir!\eng\common\msbuild.ps1" !__ArcadeScriptArgs!

for /l %%G in (1, 1, %__NumberOfTestGroups%) do (

Expand Down Expand Up @@ -394,7 +399,7 @@ REM Check that we've built about as many tests as we expect. This is primarily i
REM drastically fewer Pri-1 tests than expected.
echo %__MsgPrefix%Check the managed tests build
echo Running: dotnet msbuild %__ProjectDir%\tests\src\runtest.proj /t:CheckTestBuild /nodeReuse:false /p:CLRTestPriorityToBuild=%__Priority% %__msbuildArgs% %__unprocessedBuildArgs%
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\tests\src\runtest.proj /t:CheckTestBuild /nodeReuse:false /p:CLRTestPriorityToBuild=%__Priority% %__msbuildArgs% %__unprocessedBuildArgs%
if errorlevel 1 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: Check Test Build failed.
Expand Down Expand Up @@ -447,7 +452,7 @@ set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\tests\src\runtest.proj /t:CreateTestOverlay /nodeReuse:false^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
Expand Down Expand Up @@ -480,7 +485,7 @@ set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\tests\src\runtest.proj /t:CreateTestHost /nodeReuse:false^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
Expand Down
15 changes: 11 additions & 4 deletions src/coreclr/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ __PortableBuild=1

initTargetDistroRid()
{
source init-distro-rid.sh
source ${__ProjectDir}/init-distro-rid.sh

# Only pass ROOTFS_DIR if cross is specified.
if (( ${__CrossBuild} == 1 )); then
Expand Down Expand Up @@ -431,7 +431,7 @@ build_MSBuild_projects()
buildArgs+=("/p:__SkipPackageRestore=true");

# Disable warnAsError - coreclr issue 19922
nextCommand="\"$__ProjectRoot/eng/common/msbuild.sh\" $__ArcadeScriptArgs --warnAsError false ${buildArgs[@]}"
nextCommand="\"$__RepoRootDir/eng/common/msbuild.sh\" $__ArcadeScriptArgs --warnAsError false ${buildArgs[@]}"
echo "Building step '$stepName' testGroupToBuild=$testGroupToBuild via $nextCommand"
eval $nextCommand

Expand Down Expand Up @@ -463,7 +463,7 @@ build_MSBuild_projects()
buildArgs+=("${__UnprocessedBuildArgs[@]}")

# Disable warnAsError - coreclr issue 19922
nextCommand="\"$__ProjectRoot/eng/common/msbuild.sh\" $__ArcadeScriptArgs --warnAsError false ${buildArgs[@]}"
nextCommand="\"$__RepoRootDir/eng/common/msbuild.sh\" $__ArcadeScriptArgs --warnAsError false ${buildArgs[@]}"
echo "Building step '$stepName' via $nextCommand"
eval $nextCommand

Expand Down Expand Up @@ -505,7 +505,7 @@ build_native_projects()
__versionSourceFile="$intermediatesForBuild/version.c"
if [ $__SkipGenerateVersion == 0 ]; then
pwd
$__ProjectRoot/eng/common/msbuild.sh $__ProjectRoot/eng/empty.csproj \
$__RepoRootDir/eng/common/msbuild.sh $__ProjectRoot/eng/empty.csproj \
/p:NativeVersionFile=$__versionSourceFile \
/t:GenerateNativeVersionFile /restore \
$__CommonMSBuildArgs $__UnprocessedBuildArgs
Expand Down Expand Up @@ -605,6 +605,13 @@ usage()

# Obtain the location of the bash script to figure out where the root of the repo is.
__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
__RepoRootDir=${__ProjectRoot}/../..

# BEGIN SECTION to remove after repo consolidation
if [ ! -f "${__RepoRootDir}/.dotnet-runtime-placeholder" ]; then
__RepoRootDir=${__ProjectRoot}
fi
# END SECTION to remove after repo consolidation

# Use uname to determine what the CPU is.
CPUName=$(uname -p)
Expand Down
24 changes: 15 additions & 9 deletions src/coreclr/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ set ghprbCommentBody=
:: __BuildType -- default: Debug
:: __BuildOS -- 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: %__ProjectDir%\bin\
:: __RootBinDir -- default: %__ProjectDir%\artifacts\
:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\
:: __IntermediatesDir
:: __PackagesBinDir -- default: %__BinDir%\.nuget
Expand All @@ -50,6 +51,11 @@ set __BuildOS=Windows_NT
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__RepoRootDir=%__ProjectDir%\..\.."

rem Remove after repo consolidation
if not exist "%__RepoRootDir%\.dotnet-runtime-placeholder" ( set "__RepoRootDir=!__ProjectDir!" )

set "__ProjectFilesDir=%__ProjectDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__RootBinDir=%__ProjectDir%\bin"
Expand Down Expand Up @@ -367,7 +373,7 @@ REM ============================================================================

@if defined _echo @echo on

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\eng\empty.csproj /p:NativeVersionFile="%__RootBinDir%\obj\_version.h"^
/t:GenerateNativeVersionFile /restore^
%__CommonMSBuildArgs% %__UnprocessedBuildArgs%
Expand All @@ -385,7 +391,7 @@ REM ============================================================================
set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj
if %__RestoreOptData% EQU 1 (
echo %__MsgPrefix%Restoring the OptimizationData Package
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%OptDataProjectFilePath% /t:Restore^
%__CommonMSBuildArgs% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
Expand All @@ -398,7 +404,7 @@ set PgoDataPackagePathOutputFile="%__IntermediatesDir%\optdatapath.txt"
set IbcDataPackagePathOutputFile="%__IntermediatesDir%\ibcoptdatapath.txt"

REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
"%OptDataProjectFilePath%" /t:DumpPgoDataPackagePath %__CommonMSBuildArgs% /p:PgoDataPackagePathOutputFile="!PgoDataPackagePathOutputFile!"

if not !errorlevel! == 0 (
Expand All @@ -412,7 +418,7 @@ if not exist "!PgoDataPackagePathOutputFile!" (

set /p __PgoOptDataPath=<"!PgoDataPackagePathOutputFile!"

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
"%OptDataProjectFilePath%" /t:DumpIbcDataPackagePath /nologo %__CommonMSBuildArgs% /p:IbcDataPackagePathOutputFile="!IbcDataPackagePathOutputFile!"

if not !errorlevel! == 0 (
Expand Down Expand Up @@ -628,7 +634,7 @@ if %__BuildCoreLib% EQU 1 (
set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\src\build.proj /t:Restore^
/nodeReuse:false /p:PortableBuild=true /maxcpucount /p:IncludeRestoreOnlyProjects=true^
!__Logging! %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
Expand All @@ -641,7 +647,7 @@ if %__BuildCoreLib% EQU 1 (
)

REM Disable warnAsError to work around VS bug (948084) where ucrt lib path is not set properly, resulting in CS1668
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\src\build.proj -warnAsError:0^
/nodeReuse:false /p:PortableBuild=true /maxcpucount^
'!__MsbuildLog!' '!__MsbuildWrn!' '!__MsbuildErr!' %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
Expand Down Expand Up @@ -673,7 +679,7 @@ if %__BuildCoreLib% EQU 1 (
echo %__MsgPrefix%Commencing IBCMerge of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%
set IbcMergeProjectFilePath=%__ProjectDir%\src\.nuget\optdata\ibcmerge.csproj
set IbcMergePackagePathOutputFile="%__IntermediatesDir%\ibcmergepath.txt"
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
"!IbcMergeProjectFilePath!" /t:DumpIbcMergePackagePath /nologo %__CommonMSBuildArgs% /p:IbcMergePackagePathOutputFile="!IbcMergePackagePathOutputFile!"

if not !errorlevel! == 0 (
Expand Down Expand Up @@ -871,7 +877,7 @@ if %__BuildPackages% EQU 1 (

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 "%__ProjectDir%\eng\common\build.ps1"^
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\build.ps1"^
-r -b -projects %__SourceDir%\.nuget\packages.builds^
-verbosity minimal /nodeReuse:false /bl:!__BuildLog!^
/p:PortableBuild=true^
Expand Down
27 changes: 18 additions & 9 deletions src/coreclr/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ usage()

initTargetDistroRid()
{
source init-distro-rid.sh
source ${__ProjectDir}/init-distro-rid.sh

local passedRootfsDir=""

Expand Down Expand Up @@ -143,7 +143,7 @@ restore_optdata()
local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
if [[ ( $__SkipRestoreOptData == 0 ) && ( $__isMSBuildOnNETCoreSupported == 1 ) ]]; then
echo "Restoring the OptimizationData package"
"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs \
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs \
$OptDataProjectFilePath /t:Restore /m \
$__CommonMSBuildArgs $__UnprocessedBuildArgs
local exit_code=$?
Expand All @@ -160,7 +160,7 @@ restore_optdata()
local IbcDataPackagePathOutputFile="${__IntermediatesDir}/ibcoptdatapath.txt"

# Writes into ${PgoDataPackagePathOutputFile}
"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs $OptDataProjectFilePath /t:DumpPgoDataPackagePath ${__CommonMSBuildArgs} /p:PgoDataPackagePathOutputFile=${PgoDataPackagePathOutputFile} 2>&1 > /dev/null
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs $OptDataProjectFilePath /t:DumpPgoDataPackagePath ${__CommonMSBuildArgs} /p:PgoDataPackagePathOutputFile=${PgoDataPackagePathOutputFile} 2>&1 > /dev/null
local exit_code=$?
if [ $exit_code != 0 ] || [ ! -f "${PgoDataPackagePathOutputFile}" ]; then
echo "${__ErrMsgPrefix}Failed to get PGO data package path."
Expand All @@ -170,7 +170,7 @@ restore_optdata()
__PgoOptDataPath=$(<"${PgoDataPackagePathOutputFile}")

# Writes into ${IbcDataPackagePathOutputFile}
"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs $OptDataProjectFilePath /t:DumpIbcDataPackagePath ${__CommonMSBuildArgs} /p:IbcDataPackagePathOutputFile=${IbcDataPackagePathOutputFile} 2>&1 > /dev/null
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs $OptDataProjectFilePath /t:DumpIbcDataPackagePath ${__CommonMSBuildArgs} /p:IbcDataPackagePathOutputFile=${IbcDataPackagePathOutputFile} 2>&1 > /dev/null
local exit_code=$?
if [ $exit_code != 0 ] || [ ! -f "${IbcDataPackagePathOutputFile}" ]; then
echo "${__ErrMsgPrefix}Failed to get IBC data package path."
Expand Down Expand Up @@ -235,7 +235,7 @@ build_native()
__versionSourceFile="$intermediatesForBuild/version.c"
if [ $__SkipGenerateVersion == 0 ]; then
pwd
"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs $__ProjectRoot/eng/empty.csproj \
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs $__ProjectRoot/eng/empty.csproj \
/p:NativeVersionFile=$__versionSourceFile \
/t:GenerateNativeVersionFile /restore \
$__CommonMSBuildArgs $__UnprocessedBuildArgs
Expand Down Expand Up @@ -431,7 +431,7 @@ build_CoreLib()
__ExtraBuildArgs="$__ExtraBuildArgs /p:BuildManagedTools=true"
fi

"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs \
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs \
$__ProjectDir/src/build.proj /t:Restore \
/p:PortableBuild=true /maxcpucount /p:IncludeRestoreOnlyProjects=true \
/flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
Expand All @@ -444,7 +444,7 @@ build_CoreLib()
exit $exit_code
fi

"$__ProjectRoot/eng/common/msbuild.sh" $__ArcadeScriptArgs \
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs \
$__ProjectDir/src/build.proj \
/p:PortableBuild=true /maxcpucount \
/flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
Expand Down Expand Up @@ -538,7 +538,7 @@ generate_NugetPackages()
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
$__ProjectRoot/eng/common/build.sh -r -b -projects $__SourceDir/.nuget/packages.builds \
$__RepoRootDir/eng/common/build.sh -r -b -projects $__SourceDir/.nuget/packages.builds \
-verbosity minimal -bl:$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.binlog \
/p:PortableBuild=true \
/p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:__DoCrossArchBuild=$__CrossBuild \
Expand All @@ -560,9 +560,18 @@ echo "Commencing CoreCLR Repo build"
#
# Set the default arguments for build

# Obtain the location of the bash script to figure out where the root of the repo is.
# Obtain the location of the bash script to figure out where the root of the subrepo is.
__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Some paths are relative to the main repo root
__RepoRootDir="${__ProjectRoot}/../.."

# BEGIN SECTION to remove after repo consolidation
if [ ! -f "${__RepoRootDir}/.dotnet-runtime-placeholder" ]; then
__RepoRootDir=${__ProjectRoot}
fi
# END SECTION to remove after repo consolidation

# Use uname to determine what the CPU is.
CPUName=$(uname -p)
# Some Linux platforms report unknown for platform, but the arch for machine.
Expand Down
Loading

0 comments on commit a9c7356

Please sign in to comment.