Bump CoreFx to rc2-23808
Workaround for issue 1294 Improve crossgen notifications
This commit is contained in:
parent
199093b09c
commit
48797ea80a
67 changed files with 239 additions and 156 deletions
|
@ -14,6 +14,8 @@ $ErrorActionPreference="Stop"
|
|||
|
||||
. "$RepoRoot\scripts\build\generate-version.ps1"
|
||||
|
||||
_ "$RepoRoot\scripts\clean\clear-nuget-cache.ps1"
|
||||
|
||||
header "Building dotnet tools version $($env:DOTNET_CLI_VERSION) - $Configuration"
|
||||
header "Checking Pre-Reqs"
|
||||
|
||||
|
@ -26,13 +28,13 @@ if ($Offline){
|
|||
}
|
||||
else {
|
||||
_ "$RepoRoot\scripts\obtain\install-tools.ps1"
|
||||
|
||||
# Put the stage0 on the path
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR\cli\bin;$env:PATH"
|
||||
|
||||
_ "$RepoRoot\scripts\build\restore-packages.ps1"
|
||||
}
|
||||
|
||||
header "Cleaning out .ni's from Stage0"
|
||||
rm "$RepoRoot\.dotnet_stage0\**\*.ni.*"
|
||||
|
||||
_ "$RepoRoot\scripts\build\restore-packages.ps1"
|
||||
|
||||
header "Compiling"
|
||||
_ "$RepoRoot\scripts\compile\compile.ps1" @("$Configuration")
|
||||
|
||||
|
|
|
@ -17,8 +17,11 @@ done
|
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
source "$DIR/../common/_common.sh"
|
||||
|
||||
source "$REPOROOT/scripts/build/generate-version.sh"
|
||||
|
||||
"$REPOROOT/scripts/clean/clear-nuget-cache.sh"
|
||||
|
||||
header "Building dotnet tools version $DOTNET_CLI_VERSION - $CONFIGURATION"
|
||||
header "Checking Pre-Reqs"
|
||||
|
||||
|
@ -39,11 +42,13 @@ if [ ! -z "$OFFLINE" ]; then
|
|||
info "Skipping Tools and Package Download: Offline build"
|
||||
else
|
||||
$REPOROOT/scripts/obtain/install-tools.sh
|
||||
|
||||
# Restore using the stage 0
|
||||
PATH="$REPOROOT/.dotnet_stage0/$RID/bin:$PATH" $REPOROOT/scripts/build/restore-packages.sh
|
||||
fi
|
||||
|
||||
header "Cleaning out .ni's from Stage0"
|
||||
find ".dotnet_stage0" -name '*.ni.*' -delete
|
||||
|
||||
$REPOROOT/scripts/build/restore-packages.sh
|
||||
|
||||
header "Compiling"
|
||||
$REPOROOT/scripts/compile/compile.sh
|
||||
|
||||
|
|
|
@ -5,30 +5,14 @@
|
|||
|
||||
. $PSScriptRoot\..\common\_common.ps1
|
||||
|
||||
if ($env:CI_BUILD -eq "1") {
|
||||
# periodically clear out the package cache on the CI server
|
||||
$PackageCacheFile = "$env:NUGET_PACKAGES\packageCacheTime.txt"
|
||||
|
||||
if(!(Test-Path $PackageCacheFile)) {
|
||||
Get-Date | Out-File -FilePath $PackageCacheFile
|
||||
}
|
||||
else {
|
||||
$PackageCacheTimeProperty = Get-ItemProperty -Path $PackageCacheFile -Name CreationTimeUtc
|
||||
$PackageCacheTime = [datetime]($PackageCacheTimeProperty).CreationTimeUtc
|
||||
|
||||
if ($PackageCacheTime -lt ([datetime]::UtcNow).AddHours(-$env:NUGET_PACKAGES_CACHE_TIME_LIMIT)) {
|
||||
header "Clearing package cache"
|
||||
|
||||
Remove-Item -Recurse -Force "$env:NUGET_PACKAGES"
|
||||
mkdir $env:NUGET_PACKAGES | Out-Null
|
||||
Get-Date | Out-File -FilePath $PackageCacheFile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Restore packages
|
||||
# NOTE(anurse): I had to remove --quiet, because NuGet3 is too quiet when that's provided :(
|
||||
header "Restoring packages"
|
||||
|
||||
$StartPath = $env:PATH
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR\cli\bin;$StartPath"
|
||||
|
||||
& dotnet restore "$RepoRoot\src" --runtime "$Rid"
|
||||
& dotnet restore "$RepoRoot\tools" --runtime "$Rid"
|
||||
|
||||
$env:PATH=$StartPath
|
||||
|
|
|
@ -16,27 +16,12 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
|
||||
source "$DIR/../common/_common.sh"
|
||||
|
||||
if [ ! -z "$CI_BUILD" ]; then
|
||||
# periodically clear out the package cache on the CI server
|
||||
PackageCacheFile="$NUGET_PACKAGES/packageCacheTime.txt"
|
||||
if [ ! -f $PackageCacheFile ]; then
|
||||
date > $PackageCacheFile
|
||||
else
|
||||
#$NUGET_PACKAGES_CACHE_TIME_LIMIT is in hours
|
||||
CacheTimeLimitInSeconds=$(($NUGET_PACKAGES_CACHE_TIME_LIMIT * 3600))
|
||||
CacheExpireTime=$(($(date +%s) - $CacheTimeLimitInSeconds))
|
||||
|
||||
if [ $(date +%s -r $PackageCacheFile) -lt $CacheExpireTime ]; then
|
||||
header "Clearing package cache"
|
||||
|
||||
rm -Rf $NUGET_PACKAGES
|
||||
mkdir -p $NUGET_PACKAGES
|
||||
date > $PackageCacheFile
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
export StartPath=$PATH
|
||||
export PATH=$DOTNET_INSTALL_DIR/bin:$PATH
|
||||
|
||||
header "Restoring packages"
|
||||
|
||||
dotnet restore "$REPOROOT/src" --runtime "$RID" $DISABLE_PARALLEL
|
||||
dotnet restore "$REPOROOT/tools" --runtime "$RID" $DISABLE_PARALLEL
|
||||
|
||||
export PATH=$StartPath
|
||||
|
|
27
scripts/clean/clear-nuget-cache.ps1
Normal file
27
scripts/clean/clear-nuget-cache.ps1
Normal file
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
. $PSScriptRoot\..\common\_common.ps1
|
||||
|
||||
if ($env:CI_BUILD -eq "1") {
|
||||
# periodically clear out the package cache on the CI server
|
||||
$PackageCacheFile = "$env:NUGET_PACKAGES\packageCacheTime.txt"
|
||||
|
||||
if(!(Test-Path $PackageCacheFile)) {
|
||||
Get-Date | Out-File -FilePath $PackageCacheFile
|
||||
}
|
||||
else {
|
||||
$PackageCacheTimeProperty = Get-ItemProperty -Path $PackageCacheFile -Name CreationTimeUtc
|
||||
$PackageCacheTime = [datetime]($PackageCacheTimeProperty).CreationTimeUtc
|
||||
|
||||
if ($PackageCacheTime -lt ([datetime]::UtcNow).AddHours(-$env:NUGET_PACKAGES_CACHE_TIME_LIMIT)) {
|
||||
header "Clearing package cache"
|
||||
|
||||
Remove-Item -Recurse -Force "$env:NUGET_PACKAGES"
|
||||
mkdir $env:NUGET_PACKAGES | Out-Null
|
||||
Get-Date | Out-File -FilePath $PackageCacheFile
|
||||
}
|
||||
}
|
||||
}
|
37
scripts/clean/clear-nuget-cache.sh
Executable file
37
scripts/clean/clear-nuget-cache.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
source "$DIR/../common/_common.sh"
|
||||
|
||||
if [ ! -z "$CI_BUILD" ]; then
|
||||
# periodically clear out the package cache on the CI server
|
||||
PackageCacheFile="$NUGET_PACKAGES/packageCacheTime.txt"
|
||||
if [ ! -f $PackageCacheFile ]; then
|
||||
date > $PackageCacheFile
|
||||
else
|
||||
#$NUGET_PACKAGES_CACHE_TIME_LIMIT is in hours
|
||||
CacheTimeLimitInSeconds=$(($NUGET_PACKAGES_CACHE_TIME_LIMIT * 3600))
|
||||
CacheExpireTime=$(($(date +%s) - $CacheTimeLimitInSeconds))
|
||||
|
||||
if [ $(date +%s -r $PackageCacheFile) -lt $CacheExpireTime ]; then
|
||||
header "Clearing package cache"
|
||||
|
||||
rm -Rf $NUGET_PACKAGES
|
||||
mkdir -p $NUGET_PACKAGES
|
||||
date > $PackageCacheFile
|
||||
fi
|
||||
fi
|
||||
fi
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
. $PSScriptRoot\_utility.ps1
|
||||
|
||||
$Skip_Crossgen = $false
|
||||
$Rid = "win7-x64"
|
||||
$Tfm = "dnxcore50"
|
||||
$RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
|
||||
|
@ -25,8 +26,9 @@ $env:ReleaseSuffix = "beta"
|
|||
$env:Channel = "$env:ReleaseSuffix"
|
||||
|
||||
# Set reasonable defaults for unset variables
|
||||
setEnvIfDefault "DOTNET_INSTALL_DIR" "$(Convert-Path "$PSScriptRoot\..")\.dotnet_stage0\win7-x64"
|
||||
setEnvIfDefault "DOTNET_INSTALL_DIR" "$RepoRoot\.dotnet_stage0\win7-x64"
|
||||
setEnvIfDefault "DOTNET_CLI_VERSION" "0.1.0.0"
|
||||
setEnvIfDefault "SKIP_CROSSGEN" "$Skip_Crossgen"
|
||||
setPathAndHomeIfDefault "$Stage2Dir"
|
||||
setVarIfDefault "Configuration" "Debug"
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ source "$COMMONDIR/_prettyprint.sh"
|
|||
source "$COMMONDIR/_rid.sh"
|
||||
|
||||
# TODO: Replace this with a dotnet generation
|
||||
export SKIP_CROSSGEN=false
|
||||
export TFM=dnxcore50
|
||||
export REPOROOT=$(cd $COMMONDIR/../.. && pwd)
|
||||
export OUTPUT_ROOT=$REPOROOT/artifacts/$RID
|
||||
|
|
|
@ -75,7 +75,6 @@ $BinariesForCoreHost | ForEach-Object {
|
|||
|
||||
# Crossgen Roslyn
|
||||
if (-not (Test-Path "$StageOutputDir\bin\csc.ni.exe")) {
|
||||
header "Crossgening Roslyn compiler ..."
|
||||
_cmd "$RepoRoot\scripts\crossgen\crossgen_roslyn.cmd ""$StageOutputDir"""
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ find . -type f | xargs chmod 644
|
|||
$REPOROOT/scripts/build/fix-mode-flags.sh
|
||||
|
||||
if [ ! -f "$OUTPUT_DIR/bin/csc.ni.exe" ]; then
|
||||
info "Crossgenning Roslyn compiler ..."
|
||||
$REPOROOT/scripts/crossgen/crossgen_roslyn.sh "$OUTPUT_DIR/bin"
|
||||
fi
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ try {
|
|||
|
||||
_ "$RepoRoot\scripts\compile\compile-stage-1.ps1"
|
||||
|
||||
# Issue https://github.com/dotnet/cli/issues/1294
|
||||
_ "$RepoRoot\scripts\build\restore-packages.ps1"
|
||||
|
||||
_ "$RepoRoot\scripts\compile\compile-stage-2.ps1"
|
||||
} finally {
|
||||
$env:PATH = $StartPath
|
||||
|
|
|
@ -20,4 +20,7 @@ $REPOROOT/scripts/compile/compile-corehost.sh
|
|||
|
||||
$REPOROOT/scripts/compile/compile-stage-1.sh
|
||||
|
||||
# Issue https://github.com/dotnet/cli/issues/1294
|
||||
$REPOROOT/scripts/build/restore-packages.sh
|
||||
|
||||
$REPOROOT/scripts/compile/compile-stage-2.sh
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
if %SKIP_CROSSGEN% EQU 0 goto skip
|
||||
|
||||
echo Crossgenning Roslyn compiler ...
|
||||
|
||||
REM Get absolute path
|
||||
pushd %1
|
||||
set BIN_DIR=%CD%\bin
|
||||
popd
|
||||
|
||||
REM Replace with a robust method for finding the right crossgen.exe
|
||||
set CROSSGEN_UTIL=%NUGET_PACKAGES%\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23805\tools\crossgen.exe
|
||||
set CROSSGEN_UTIL=%NUGET_PACKAGES%\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23808\tools\crossgen.exe
|
||||
|
||||
REM Crossgen currently requires itself to be next to mscorlib
|
||||
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul
|
||||
|
@ -21,28 +25,33 @@ if exist mscorlib.ni.dll (
|
|||
copy /Y mscorlib.ni.dll mscorlib.dll > nul
|
||||
)
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Collections.Immutable.dll >nul 2>nul
|
||||
set READYTORUN=
|
||||
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% System.Collections.Immutable.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Reflection.Metadata.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% System.Reflection.Metadata.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.CSharp.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.CSharp.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.VisualBasic.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.VisualBasic.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% csc.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.dll >nul 2>nul
|
||||
crossgen /nologo %READYTORUN% /Platform_Assemblies_Paths %BIN_DIR% vbc.dll >nul 2>nul
|
||||
if not %errorlevel% EQU 0 goto fail
|
||||
|
||||
popd
|
||||
|
||||
echo CrossGen Roslyn Finished
|
||||
|
||||
goto end
|
||||
|
||||
:fail
|
||||
|
@ -50,4 +59,8 @@ popd
|
|||
echo Crossgen failed...
|
||||
exit /B 1
|
||||
|
||||
:skip
|
||||
echo Skipping Crossgen
|
||||
goto end
|
||||
|
||||
:end
|
||||
|
|
|
@ -4,6 +4,25 @@
|
|||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
source "$DIR/../common/_common.sh"
|
||||
|
||||
if $SKIP_CROSSGEN ; then
|
||||
echo "Skipping Crossgen"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
info "Crossgenning Roslyn compiler ..."
|
||||
|
||||
set -e
|
||||
|
||||
BIN_DIR="$( cd $1 && pwd )"
|
||||
|
@ -22,8 +41,10 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
READYTORUN=""
|
||||
|
||||
# Replace with a robust method for finding the right crossgen.exe
|
||||
CROSSGEN_UTIL=$NUGET_PACKAGES/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23805/tools/crossgen
|
||||
CROSSGEN_UTIL=$NUGET_PACKAGES/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23808/tools/crossgen
|
||||
|
||||
cd $BIN_DIR
|
||||
|
||||
|
@ -31,20 +52,22 @@ cd $BIN_DIR
|
|||
cp $CROSSGEN_UTIL $BIN_DIR
|
||||
chmod +x crossgen
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR mscorlib.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR mscorlib.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR System.Collections.Immutable.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR System.Collections.Immutable.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR System.Reflection.Metadata.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR System.Reflection.Metadata.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.CSharp.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.CSharp.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.VisualBasic.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.VisualBasic.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR csc.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR csc.dll
|
||||
[ -e csc.ni.exe ] && [ ! -e csc.ni.dll ] && mv csc.ni.exe csc.ni.dll
|
||||
|
||||
./crossgen -nologo -platform_assemblies_paths $BIN_DIR vbc.dll
|
||||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR vbc.dll
|
||||
[ -e vbc.ni.exe ] && [ ! -e vbc.ni.dll ] && mv vbc.ni.exe vbc.ni.dll
|
||||
|
||||
info "CrossGen Roslyn Finished"
|
Loading…
Add table
Add a link
Reference in a new issue