From c39678d3cbe9ac5acd14ca09f5228754279f10a0 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 25 Mar 2016 19:28:29 +0100 Subject: [PATCH 1/2] support project.json compilationOptions.debugType in fsc it's used only if set, default is old behaviour (debug enabled only on win) --- .../commands/dotnet-compile-fsc/Program.cs | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/dotnet/commands/dotnet-compile-fsc/Program.cs b/src/dotnet/commands/dotnet-compile-fsc/Program.cs index a47c70c3f..9ff234476 100644 --- a/src/dotnet/commands/dotnet-compile-fsc/Program.cs +++ b/src/dotnet/commands/dotnet-compile-fsc/Program.cs @@ -104,15 +104,26 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc allArgs.Add($"--out:{outputName}"); } - //debug info (only windows pdb supported, not portablepdb) - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + //let's pass debugging type only if options.DebugType is specified, until + //portablepdb are confirmed to work. + //so it's possibile to test portable pdb without breaking existing build + if (string.IsNullOrEmpty(commonOptions.DebugType)) { - allArgs.Add("--debug"); - //TODO check if full or pdbonly - allArgs.Add("--debug:pdbonly"); + //debug info (only windows pdb supported, not portablepdb) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + allArgs.Add("--debug"); + //TODO check if full or pdbonly + allArgs.Add("--debug:pdbonly"); + } + else + allArgs.Add("--debug-"); } else - allArgs.Add("--debug-"); + { + allArgs.Add("--debug"); + allArgs.Add($"--debug:{commonOptions.DebugType}"); + } // Default options allArgs.Add("--noframework"); From ac05fde9bdd4719e545ded011ddece59cae326bd Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Sat, 26 Mar 2016 00:27:43 +0100 Subject: [PATCH 2/2] fsc, always pass --nocopyfsharpcore to disable copy of FSharp.Core to output directory --- src/dotnet/commands/dotnet-compile-fsc/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dotnet/commands/dotnet-compile-fsc/Program.cs b/src/dotnet/commands/dotnet-compile-fsc/Program.cs index 9ff234476..6eb454330 100644 --- a/src/dotnet/commands/dotnet-compile-fsc/Program.cs +++ b/src/dotnet/commands/dotnet-compile-fsc/Program.cs @@ -129,6 +129,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc allArgs.Add("--noframework"); allArgs.Add("--nologo"); allArgs.Add("--simpleresolution"); + allArgs.Add("--nocopyfsharpcore"); // project.json compilationOptions if (commonOptions.Defines != null)