switch to latest coreclr

This commit is contained in:
Andrew Stanton-Nurse 2015-10-28 14:35:29 -07:00
parent a29ebe05ff
commit a715be1d59
26 changed files with 98 additions and 150 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -39,13 +39,15 @@ STAGE0_DIR=$OUTPUT_ROOT/stage0
STAGE1_DIR=$OUTPUT_ROOT/stage1 STAGE1_DIR=$OUTPUT_ROOT/stage1
STAGE2_DIR=$OUTPUT_ROOT/stage2 STAGE2_DIR=$OUTPUT_ROOT/stage2
echo "Cleaning artifacts folder" if [ "$DOTNET_CI_SKIP_STAGE0_INSTALL" != "1" ]; then
rm -rf $OUTPUT_ROOT
echo "Installing stage0" echo "Installing stage0"
# Use a sub-shell to ensure the DNVM gets cleaned up # Use a sub-shell to ensure the DNVM gets cleaned up
rm -Rf $STAGE0_DIR
mkdir -p $STAGE0_DIR mkdir -p $STAGE0_DIR
$DIR/install-stage0.sh $STAGE0_DIR $DIR/dnvm2.sh $DIR/install-stage0.sh $STAGE0_DIR $DIR/dnvm2.sh
else
echo "Skipping stage0 because DOTNET_CI_SKIP_STAGE0_INSTALL"
fi
export PATH=$STAGE0_DIR/bin:$PATH export PATH=$STAGE0_DIR/bin:$PATH
@ -85,15 +87,15 @@ dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE1_DIR" --config
dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE1_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Publish" dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE1_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Publish"
dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE1_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Resgen" dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE1_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Resgen"
# Update stage1 with the checked-in CoreCLR
cp $REPOROOT/ext/CoreCLR/$RID/* $STAGE1_DIR
# Add stage1 to the path and use it to build stage2 # Add stage1 to the path and use it to build stage2
export PATH=$STAGE1_DIR:$START_PATH export PATH=$STAGE1_DIR:$START_PATH
# Make corerun explicitly executable # Make corerun explicitly executable
chmod a+x $STAGE1_DIR/corerun chmod a+x $STAGE1_DIR/corerun
# Clean up stage2
[ -d "$STAGE2_DIR" ] && rm -Rf "$STAGE2_DIR"
echo "Building stage2 dotnet using stage1 ..." echo "Building stage2 dotnet using stage1 ..."
dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE2_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Cli" dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE2_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Cli"
dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE2_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Compiler" dotnet publish --framework "$TFM" --runtime $RID --output "$STAGE2_DIR" --configuration "$CONFIGURATION" "$REPOROOT/src/Microsoft.DotNet.Tools.Compiler"
@ -128,7 +130,7 @@ OUTPUT=$($REPOROOT/artifacts/$RID/smoketest/TestApp)
# Check that a compiler error is reported # Check that a compiler error is reported
set +e set +e
dotnet compile "$REPOROOT/test/compile/failing/SimpleCompilerError" --framework "$TFM" 2>&1 >/dev/null dotnet compile "$REPOROOT/test/compile/failing/SimpleCompilerError" --framework "$TFM" 2>/dev/null >/dev/null
rc=$? rc=$?
if [ $rc == 0 ]; then if [ $rc == 0 ]; then
echo "Compiler failure test failed! The compiler did not fail to compile!" echo "Compiler failure test failed! The compiler did not fail to compile!"

View file

@ -25,4 +25,5 @@ docker run --rm --sig-proxy=true \
--name $DOTNET_BUILD_CONTAINER_NAME \ --name $DOTNET_BUILD_CONTAINER_NAME \
-v $DOCKER_HOST_SHARE_DIR:/opt/code \ -v $DOCKER_HOST_SHARE_DIR:/opt/code \
-e DOTNET_BUILD_VERSION=$DOTNET_BUILD_VERSION \ -e DOTNET_BUILD_VERSION=$DOTNET_BUILD_VERSION \
-e DOTNET_CI_SKIP_STAGE0_INSTALL=$DOTNET_CI_SKIP_STAGE0_INSTALL \
$DOTNET_BUILD_CONTAINER_TAG $BUILD_COMMAND $1 $DOTNET_BUILD_CONTAINER_TAG $BUILD_COMMAND $1

View file

@ -4,10 +4,13 @@
"shared": "**/*.cs", "shared": "**/*.cs",
"dependencies": { "dependencies": {
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-*",
"System.IO.FileSystem": "4.0.1-beta-23420", "System.IO.FileSystem": "4.0.1-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23420" "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-*",
"Microsoft.NETCore.ConsoleHost": "1.0.0-beta-*",
"Microsoft.NETCore.TestHost": "1.0.0-beta-*"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }

View file

@ -8,19 +8,19 @@
"dotnet": "Microsoft.DotNet.Cli" "dotnet": "Microsoft.DotNet.Cli"
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.Runtime": "1.0.1-beta-23420", "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-*",
"System.Collections": "4.0.11-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {
"type": "build", "type": "build",
"version": "1.0.0-*" "version": "1.0.0-*"
}, },
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15838" "version": "1.0.0-*"
} }
}, },
"frameworks": { "frameworks": {

View file

@ -8,14 +8,14 @@
"dotnet-compile-csc": "Microsoft.DotNet.Tools.Compiler.Csc" "dotnet-compile-csc": "Microsoft.DotNet.Tools.Compiler.Csc"
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.TestHost": "1.0.0-beta-23420", "Microsoft.NETCore.TestHost": "1.0.0-beta-*",
"Microsoft.NETCore.Runtime": "1.0.1-beta-23420", "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-*",
"System.Collections": "4.0.11-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"System.IO.FileSystem": "4.0.1-beta-23420", "System.IO.FileSystem": "4.0.1-beta-*",
"Microsoft.Extensions.ProjectModel": "1.0.0-*", "Microsoft.Extensions.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {
"type": "build", "type": "build",
@ -23,7 +23,7 @@
}, },
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15838" "version": "1.0.0-*"
}, },
"Microsoft.Net.Compilers.netcore": "1.1.0-*" "Microsoft.Net.Compilers.netcore": "1.1.0-*"
}, },

View file

@ -8,13 +8,13 @@
"dotnet-compile": "Microsoft.DotNet.Tools.Compiler" "dotnet-compile": "Microsoft.DotNet.Tools.Compiler"
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.Runtime": "1.0.1-beta-23420", "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-*",
"System.Collections": "4.0.11-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"System.IO.FileSystem": "4.0.1-beta-23420", "System.IO.FileSystem": "4.0.1-beta-*",
"Microsoft.Extensions.ProjectModel": "1.0.0-*", "Microsoft.Extensions.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {
"type": "build", "type": "build",
@ -22,7 +22,7 @@
}, },
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15838" "version": "1.0.0-*"
}, },
"Microsoft.Net.Compilers.netcore": "1.1.0-*" "Microsoft.Net.Compilers.netcore": "1.1.0-*"
}, },

View file

@ -12,8 +12,6 @@ namespace Microsoft.DotNet.Tools.Publish
{ {
public class Program public class Program
{ {
public static readonly IEnumerable<string> CoreCLRFileNames = GetCoreCLRFileNames();
public static int Main(string[] args) public static int Main(string[] args)
{ {
DebugHelper.HandleDebugSwitch(ref args); DebugHelper.HandleDebugSwitch(ref args);
@ -157,9 +155,18 @@ namespace Microsoft.DotNet.Tools.Publish
private static int PublishForUnix(ProjectContext context, string outputPath) private static int PublishForUnix(ProjectContext context, string outputPath)
{ {
CopyCoreCLR(outputPath);
var coreConsole = Path.Combine(outputPath, Constants.CoreConsoleName); var coreConsole = Path.Combine(outputPath, Constants.CoreConsoleName);
if(!File.Exists(coreConsole))
{
Reporter.Error.WriteLine($"Cannot find {Constants.CoreConsoleName} in the output. You must have a direct dependency on Microsoft.NETCore.ConsoleHost (for now)");
return 1;
}
var coreRun = Path.Combine(outputPath, Constants.CoreRunName); var coreRun = Path.Combine(outputPath, Constants.CoreRunName);
if(!File.Exists(coreRun))
{
Reporter.Error.WriteLine($"Cannot find {Constants.CoreRunName} in the output. You must have a direct dependency on Microsoft.NETCore.TestHost (for now)");
return 1;
}
// Use the 'command' field to generate the name // Use the 'command' field to generate the name
var outputExe = Path.Combine(outputPath, context.ProjectFile.Name); var outputExe = Path.Combine(outputPath, context.ProjectFile.Name);
@ -193,9 +200,18 @@ exec ""$DIR/corerun"" ""$DIR/{context.ProjectFile.Name}.exe"" $*
return 0; return 0;
} }
CopyCoreCLR(outputPath);
var coreConsole = Path.Combine(outputPath, Constants.CoreConsoleName); var coreConsole = Path.Combine(outputPath, Constants.CoreConsoleName);
if(!File.Exists(coreConsole))
{
Reporter.Error.WriteLine($"Cannot find {Constants.CoreConsoleName} in the output. You must have a direct dependency on Microsoft.NETCore.ConsoleHost (for now)".Red());
return 1;
}
var coreRun = Path.Combine(outputPath, Constants.CoreRunName); var coreRun = Path.Combine(outputPath, Constants.CoreRunName);
if(!File.Exists(coreRun))
{
Reporter.Error.WriteLine($"Cannot find {Constants.CoreRunName} in the output. You must have a direct dependency on Microsoft.NETCore.TestHost (for now)".Red());
return 1;
}
var outputExe = Path.Combine(outputPath, context.ProjectFile.Name + Constants.ExeSuffix); var outputExe = Path.Combine(outputPath, context.ProjectFile.Name + Constants.ExeSuffix);
@ -207,17 +223,6 @@ exec ""$DIR/corerun"" ""$DIR/{context.ProjectFile.Name}.exe"" $*
return 0; return 0;
} }
private static void CopyCoreCLR(string outputPath)
{
// TEMPORARILY bring checked-in CoreCLR stuff along for the ride.
var clrPath = AppContext.BaseDirectory;
foreach(var file in CoreCLRFileNames)
{
File.Copy(Path.Combine(clrPath, file), Path.Combine(outputPath, file), overwrite: true);
}
}
private static void CopyContents(ProjectContext context, string outputPath) private static void CopyContents(ProjectContext context, string outputPath)
{ {
var sourceFiles = context.ProjectFile.Files.GetFilesForBundling(); var sourceFiles = context.ProjectFile.Files.GetFilesForBundling();
@ -289,32 +294,5 @@ exec ""$DIR/corerun"" ""$DIR/{context.ProjectFile.Name}.exe"" $*
File.Copy(file, Path.Combine(outputPath, Path.GetFileName(file)), overwrite: true); File.Copy(file, Path.Combine(outputPath, Path.GetFileName(file)), overwrite: true);
} }
} }
private static IEnumerable<string> GetCoreCLRFileNames()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
yield return "coreclr.dll";
yield return "CoreConsole.exe";
yield return "CoreRun.exe";
yield return "mscorlib.ni.dll";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
yield return "libcoreclr.dylib";
yield return "coreconsole";
yield return "corerun";
yield return "mscorlib.dll";
yield return "System.Globalization.Native.dylib";
}
else
{
yield return "libcoreclr.so";
yield return "coreconsole";
yield return "corerun";
yield return "mscorlib.dll";
yield return "System.Globalization.Native.so";
}
}
} }
} }

View file

@ -8,12 +8,14 @@
"dotnet-publish": "Microsoft.DotNet.Tools.Publish" "dotnet-publish": "Microsoft.DotNet.Tools.Publish"
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.Runtime": "1.0.1-beta-23420", "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
"System.Console": "4.0.0-beta-23420",
"System.Collections": "4.0.11-beta-23420", "System.Console": "4.0.0-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.IO.FileSystem": "4.0.1-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"System.IO.FileSystem": "4.0.1-beta-*",
"System.AppContext": "4.0.1-beta-*",
"Microsoft.Extensions.ProjectModel": "1.0.0-*", "Microsoft.Extensions.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {
"type": "build", "type": "build",
@ -21,9 +23,8 @@
}, },
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15838" "version": "1.0.0-*"
}, }
"System.AppContext": "4.0.1-beta-23420"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }

View file

@ -8,23 +8,23 @@
"resgen": "Microsoft.DotNet.Tools.Resgen" "resgen": "Microsoft.DotNet.Tools.Resgen"
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.TestHost": "1.0.0-beta-23420", "Microsoft.NETCore.TestHost": "1.0.0-beta-*",
"Microsoft.NETCore.Runtime": "1.0.1-beta-23420", "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-*",
"System.Collections": "4.0.11-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.Diagnostics.Process": "4.1.0-beta-23420", "System.Diagnostics.Process": "4.1.0-beta-*",
"System.IO.FileSystem": "4.0.1-beta-23420", "System.IO.FileSystem": "4.0.1-beta-*",
"System.Xml.XDocument": "4.0.11-beta-*",
"System.Resources.ReaderWriter": "4.0.0-beta-*",
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {
"type": "build", "type": "build",
"version": "1.0.0-*" "version": "1.0.0-*"
}, },
"Microsoft.Extensions.CommandLineUtils.Sources": { "Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15838" "version": "1.0.0-*"
}, }
"System.Xml.XDocument": "4.0.11-beta-23420",
"System.Resources.ReaderWriter": "4.0.0-beta-23420"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }

View file

@ -2,25 +2,25 @@
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "Types to model a .NET Project", "description": "Types to model a .NET Project",
"dependencies": { "dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23420", "Microsoft.CSharp": "4.0.1-beta-*",
"System.Collections": "4.0.11-beta-23420", "System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-23420", "System.Linq": "4.0.1-beta-*",
"System.Threading.Thread": "4.0.0-beta-23420", "System.Threading.Thread": "4.0.0-beta-*",
"System.Runtime.Loader": "4.0.0-beta-23420", "System.Runtime.Loader": "4.0.0-beta-*",
"System.Dynamic.Runtime": "4.0.11-beta-23420", "System.Dynamic.Runtime": "4.0.11-beta-*",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23420", "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-*",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23420", "System.Security.Cryptography.Algorithms": "4.0.0-beta-*",
"NuGet.Packaging": "3.2.0", "NuGet.Packaging": "3.2.0",
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-beta8-*", "Microsoft.Extensions.FileSystemGlobbing": "1.0.0-*",
"Microsoft.Extensions.JsonParser.Sources": { "Microsoft.Extensions.JsonParser.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15792" "version": "1.0.0-*"
}, },
"Microsoft.Extensions.HashCodeCombiner.Sources": { "Microsoft.Extensions.HashCodeCombiner.Sources": {
"type": "build", "type": "build",
"version": "1.0.0-rc1-15718 " "version": "1.0.0-*"
} }
}, },

View file

@ -1,40 +0,0 @@
#ifndef TPAFILE_H
#define TPAFILE_H
#include <vector>
#include "pal.h"
struct tpaentry_t
{
pal::string_t asset_type;
pal::string_t library_name;
pal::string_t library_version;
pal::string_t library_hash;
pal::string_t relative_path;
pal::string_t absolute_path;
pal::string_t asset_name;
};
class tpafile
{
public:
static std::pair<bool, tpafile> load(pal::string_t path);
inline const std::vector<tpaentry_t>& entries() { return m_entries; }
inline bool present() { return m_present; }
void add_from(const pal::string_t& dir);
void write_tpa_list(pal::string_t& output);
void write_native_paths(std::string& output);
void set_package_paths(std::vector<pal::string_t> search_paths) { m_package_search_paths = search_paths; }
private:
tpafile(bool present, std::vector<tpaentry_t> entries) : m_present(present), m_entries(entries) {}
bool m_present;
std::vector<tpaentry_t> m_entries;
std::vector<pal::string_t> m_package_search_paths;
};
#endif // TPAFILE_H

View file

@ -9,7 +9,10 @@
"System.IO": "4.0.10-beta-23420", "System.IO": "4.0.10-beta-23420",
"System.Console": "4.0.0-beta-23420", "System.Console": "4.0.0-beta-23420",
"System.Runtime": "4.0.20-beta-23420", "System.Runtime": "4.0.20-beta-23420",
"System.Diagnostics.Process": "4.1.0-beta-23420" "System.Diagnostics.Process": "4.1.0-beta-23420",
"Microsoft.NETCore.ConsoleHost": "1.0.0-beta-*",
"Microsoft.NETCore.TestHost": "1.0.0-beta-*"
}, },
"frameworks": { "frameworks": {