Upgrade csc ref to latest

Provides a few benefits:

1) The new package has the correct dependencies listed, so I removed the
-MissingDependenciesOK flag from the crossgen scripts.

2) The new compiler supports -publicSign (formerly called "OSS sign"),
which I patched through dotnet-compile-csc .
This commit is contained in:
Andy Gocke 2015-11-17 23:37:39 -08:00
parent caba865565
commit 869b927350
8 changed files with 22 additions and 21 deletions

View file

@ -36,10 +36,10 @@ 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 if not %errorlevel% EQU 0 goto fail
crossgen /MissingDependenciesOK /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.exe >nul 2>nul crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.exe >nul 2>nul
if not %errorlevel% EQU 0 goto fail if not %errorlevel% EQU 0 goto fail
crossgen /MissingDependenciesOK /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.exe >nul 2>nul crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.exe >nul 2>nul
if not %errorlevel% EQU 0 goto fail if not %errorlevel% EQU 0 goto fail
popd popd

View file

@ -42,8 +42,8 @@ chmod +x crossgen
./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.VisualBasic.dll ./crossgen -nologo -platform_assemblies_paths $BIN_DIR Microsoft.CodeAnalysis.VisualBasic.dll
./crossgen -MissingDependenciesOK -nologo -platform_assemblies_paths $BIN_DIR csc.dll ./crossgen -nologo -platform_assemblies_paths $BIN_DIR csc.dll
[ -e csc.ni.exe ] && [ ! -e csc.ni.dll ] && mv csc.ni.exe csc.ni.dll [ -e csc.ni.exe ] && [ ! -e csc.ni.dll ] && mv csc.ni.exe csc.ni.dll
./crossgen -MissingDependenciesOK -nologo -platform_assemblies_paths $BIN_DIR vbc.dll ./crossgen -nologo -platform_assemblies_paths $BIN_DIR vbc.dll
[ -e vbc.ni.exe ] && [ ! -e vbc.ni.dll ] && mv vbc.ni.exe vbc.ni.dll [ -e vbc.ni.exe ] && [ ! -e vbc.ni.dll ] && mv vbc.ni.exe vbc.ni.dll

View file

@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
internal static readonly OptionTemplate s_delaySignTemplate = new OptionTemplate("delay-sign"); internal static readonly OptionTemplate s_delaySignTemplate = new OptionTemplate("delay-sign");
internal static readonly OptionTemplate s_ossSignTemplate = new OptionTemplate("oss-sign"); internal static readonly OptionTemplate s_publicSignTemplate = new OptionTemplate("public-sign");
internal static readonly OptionTemplate s_emitEntryPointTemplate = new OptionTemplate("emit-entry-point"); internal static readonly OptionTemplate s_emitEntryPointTemplate = new OptionTemplate("emit-entry-point");
@ -42,7 +42,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
bool? optimize = null; bool? optimize = null;
string keyFile = null; string keyFile = null;
bool? delaySign = null; bool? delaySign = null;
bool? strongName = null; bool? publicSign = null;
bool? emitEntryPoint = null; bool? emitEntryPoint = null;
Func<string, bool?> nullableBoolConverter = v => bool.Parse(v); Func<string, bool?> nullableBoolConverter = v => bool.Parse(v);
@ -70,8 +70,8 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
syntax.DefineOption(s_delaySignTemplate.LongName, ref delaySign, syntax.DefineOption(s_delaySignTemplate.LongName, ref delaySign,
nullableBoolConverter, "Delay-sign the output assembly"); nullableBoolConverter, "Delay-sign the output assembly");
syntax.DefineOption(s_ossSignTemplate.LongName, ref strongName, syntax.DefineOption(s_publicSignTemplate.LongName, ref publicSign,
nullableBoolConverter, "OSS sign the output assembly"); nullableBoolConverter, "Public-sign the output assembly");
syntax.DefineOption(s_emitEntryPointTemplate.LongName, ref emitEntryPoint, syntax.DefineOption(s_emitEntryPointTemplate.LongName, ref emitEntryPoint,
nullableBoolConverter, "Output an executable console program"); nullableBoolConverter, "Output an executable console program");
@ -86,7 +86,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
Optimize = optimize, Optimize = optimize,
KeyFile = keyFile, KeyFile = keyFile,
DelaySign = delaySign, DelaySign = delaySign,
UseOssSigning = strongName, PublicSign = publicSign,
EmitEntryPoint = emitEntryPoint EmitEntryPoint = emitEntryPoint
}; };
} }
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
var optimize = options.Optimize; var optimize = options.Optimize;
var keyFile = options.KeyFile; var keyFile = options.KeyFile;
var delaySign = options.DelaySign; var delaySign = options.DelaySign;
var ossSign = options.UseOssSigning; var publicSign = options.PublicSign;
var emitEntryPoint = options.EmitEntryPoint; var emitEntryPoint = options.EmitEntryPoint;
var args = new List<string>(); var args = new List<string>();
@ -146,9 +146,9 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
args.Add(s_delaySignTemplate.ToLongArg(delaySign)); args.Add(s_delaySignTemplate.ToLongArg(delaySign));
} }
if (ossSign != null) if (publicSign != null)
{ {
args.Add(s_ossSignTemplate.ToLongArg(ossSign)); args.Add(s_publicSignTemplate.ToLongArg(publicSign));
} }
if (emitEntryPoint != null) if (emitEntryPoint != null)

View file

@ -25,7 +25,7 @@ namespace Microsoft.Extensions.ProjectModel
public bool? DelaySign { get; set; } public bool? DelaySign { get; set; }
public bool? UseOssSigning { get; set; } public bool? PublicSign { get; set; }
public bool? EmitEntryPoint { get; set; } public bool? EmitEntryPoint { get; set; }
@ -82,9 +82,9 @@ namespace Microsoft.Extensions.ProjectModel
result.DelaySign = option.DelaySign; result.DelaySign = option.DelaySign;
} }
if (option.UseOssSigning != null) if (option.PublicSign != null)
{ {
result.UseOssSigning = option.UseOssSigning; result.PublicSign = option.PublicSign;
} }
if (option.EmitEntryPoint != null) if (option.EmitEntryPoint != null)

View file

@ -522,7 +522,7 @@ namespace Microsoft.Extensions.ProjectModel
Optimize = rawOptions.ValueAsNullableBoolean("optimize"), Optimize = rawOptions.ValueAsNullableBoolean("optimize"),
KeyFile = rawOptions.ValueAsString("keyFile"), KeyFile = rawOptions.ValueAsString("keyFile"),
DelaySign = rawOptions.ValueAsNullableBoolean("delaySign"), DelaySign = rawOptions.ValueAsNullableBoolean("delaySign"),
UseOssSigning = rawOptions.ValueAsNullableBoolean("useOssSigning"), PublicSign = rawOptions.ValueAsNullableBoolean("publicSign"),
EmitEntryPoint = rawOptions.ValueAsNullableBoolean("emitEntryPoint") EmitEntryPoint = rawOptions.ValueAsNullableBoolean("emitEntryPoint")
}; };
} }

View file

@ -149,9 +149,10 @@ namespace Microsoft.DotNet.Tools.Compiler.Csc
commonArgs.Add("-delaysign"); commonArgs.Add("-delaysign");
} }
// TODO: What is this? What does it mean to sign without a key? if (options.PublicSign == true)
// Is this "OSS" signing? {
// if (options.StrongName) commonArgs.Add("-publicsign");
}
if (options.EmitEntryPoint != true) if (options.EmitEntryPoint != true)
{ {

View file

@ -20,7 +20,7 @@
"version": "1.0.0-*" "version": "1.0.0-*"
}, },
"Microsoft.DotNet.Compiler.Common": "1.0.0-*", "Microsoft.DotNet.Compiler.Common": "1.0.0-*",
"Microsoft.Net.Compilers.netcore": "1.2.0-beta-20151111-02" "Microsoft.Net.Compilers.netcore": "1.2.0-beta-20151117-04"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }

View file

@ -20,7 +20,7 @@
"type": "build", "type": "build",
"version": "1.0.0-*" "version": "1.0.0-*"
}, },
"Microsoft.Net.Compilers.netcore": "1.2.0-beta-20151111-02" "Microsoft.Net.Compilers.netcore": "1.2.0-beta-20151117-04"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": { }