Merge pull request #229 from agocke/AddPublicSignSupport
Upgrade csc ref to latest
This commit is contained in:
commit
2730254c5a
8 changed files with 31 additions and 21 deletions
|
@ -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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
popd
|
||||
|
|
|
@ -42,8 +42,8 @@ chmod +x crossgen
|
|||
|
||||
./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
|
||||
|
||||
./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
|
||||
|
|
|
@ -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_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");
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
|
|||
bool? optimize = null;
|
||||
string keyFile = null;
|
||||
bool? delaySign = null;
|
||||
bool? strongName = null;
|
||||
bool? publicSign = null;
|
||||
bool? emitEntryPoint = null;
|
||||
|
||||
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,
|
||||
nullableBoolConverter, "Delay-sign the output assembly");
|
||||
|
||||
syntax.DefineOption(s_ossSignTemplate.LongName, ref strongName,
|
||||
nullableBoolConverter, "OSS sign the output assembly");
|
||||
syntax.DefineOption(s_publicSignTemplate.LongName, ref publicSign,
|
||||
nullableBoolConverter, "Public-sign the output assembly");
|
||||
|
||||
syntax.DefineOption(s_emitEntryPointTemplate.LongName, ref emitEntryPoint,
|
||||
nullableBoolConverter, "Output an executable console program");
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
|
|||
Optimize = optimize,
|
||||
KeyFile = keyFile,
|
||||
DelaySign = delaySign,
|
||||
UseOssSigning = strongName,
|
||||
PublicSign = publicSign,
|
||||
EmitEntryPoint = emitEntryPoint
|
||||
};
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
|
|||
var optimize = options.Optimize;
|
||||
var keyFile = options.KeyFile;
|
||||
var delaySign = options.DelaySign;
|
||||
var ossSign = options.UseOssSigning;
|
||||
var publicSign = options.PublicSign;
|
||||
var emitEntryPoint = options.EmitEntryPoint;
|
||||
|
||||
var args = new List<string>();
|
||||
|
@ -146,9 +146,9 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
|
|||
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)
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
|
||||
public bool? DelaySign { get; set; }
|
||||
|
||||
public bool? UseOssSigning { get; set; }
|
||||
public bool? PublicSign { get; set; }
|
||||
|
||||
public bool? EmitEntryPoint { get; set; }
|
||||
|
||||
|
@ -82,9 +82,9 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
result.DelaySign = option.DelaySign;
|
||||
}
|
||||
|
||||
if (option.UseOssSigning != null)
|
||||
if (option.PublicSign != null)
|
||||
{
|
||||
result.UseOssSigning = option.UseOssSigning;
|
||||
result.PublicSign = option.PublicSign;
|
||||
}
|
||||
|
||||
if (option.EmitEntryPoint != null)
|
||||
|
|
|
@ -522,7 +522,7 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
Optimize = rawOptions.ValueAsNullableBoolean("optimize"),
|
||||
KeyFile = rawOptions.ValueAsString("keyFile"),
|
||||
DelaySign = rawOptions.ValueAsNullableBoolean("delaySign"),
|
||||
UseOssSigning = rawOptions.ValueAsNullableBoolean("useOssSigning"),
|
||||
PublicSign = rawOptions.ValueAsNullableBoolean("publicSign"),
|
||||
EmitEntryPoint = rawOptions.ValueAsNullableBoolean("emitEntryPoint")
|
||||
};
|
||||
}
|
||||
|
|
|
@ -142,6 +142,15 @@ namespace Microsoft.DotNet.Tools.Compiler.Csc
|
|||
if (options.KeyFile != null)
|
||||
{
|
||||
commonArgs.Add($"-keyfile:\"{options.KeyFile}\"");
|
||||
|
||||
// If we're not on Windows, full signing isn't supported, so we'll
|
||||
// public sign, unless the public sign switch has explicitly been
|
||||
// set to false
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
|
||||
options.PublicSign == null)
|
||||
{
|
||||
commonArgs.Add("-publicsign");
|
||||
}
|
||||
}
|
||||
|
||||
if (options.DelaySign == true)
|
||||
|
@ -149,9 +158,10 @@ namespace Microsoft.DotNet.Tools.Compiler.Csc
|
|||
commonArgs.Add("-delaysign");
|
||||
}
|
||||
|
||||
// TODO: What is this? What does it mean to sign without a key?
|
||||
// Is this "OSS" signing?
|
||||
// if (options.StrongName)
|
||||
if (options.PublicSign == true)
|
||||
{
|
||||
commonArgs.Add("-publicsign");
|
||||
}
|
||||
|
||||
if (options.EmitEntryPoint != true)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"version": "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": {
|
||||
"dnxcore50": { }
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"type": "build",
|
||||
"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": {
|
||||
"dnxcore50": { }
|
||||
|
|
Loading…
Reference in a new issue