зеркало из https://github.com/dotnet/fsharp.git
FSharp ms build task to support new xommand line options (#1616)
This commit is contained in:
Родитель
749ba2dfbb
Коммит
e0318a8f65
|
@ -31,8 +31,9 @@
|
|||
<DebugType Condition=" '$(DebugType)' == '' and '$(TargetFramework)' == 'coreclr' ">embedded</DebugType>
|
||||
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
|
||||
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
|
||||
<OtherFlags Condition=" '$(DebugType)' == '' and '$(TargetFramework)' != 'coreclr' ">$(OtherFlags) --no-jit-optimize</OtherFlags>
|
||||
<OtherFlags Condition=" '$(DebugType)' == '' and '$(TargetFramework)' == 'coreclr' ">$(OtherFlags) --no-jit-optimize --embed</OtherFlags>
|
||||
<OtherFlags>$(OtherFlags) --no-jit-optimize</OtherFlags>
|
||||
<EmbedAllSource Condition=" '$(DebugType)' == 'portable' or '$(DebugType)' == 'embedded' ">true</EmbedAllSource>
|
||||
<SourceLink Condition=" '$(DebugType)' == 'portable' or '$(DebugType)' == 'embedded' ">$(IntermediateOutputPath)source_link.json</SourceLink>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' != 'VisualBasic' ">DEBUG;TRACE;CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' == 'VisualBasic' ">DEBUG=True,TRACE=True,CODE_ANALYSIS=True,$(DefineConstants)</DefineConstants>
|
||||
<SIGN_WITH_MSFT_KEY Condition=" '$(SIGN_WITH_MSFT_KEY)' == '' ">false</SIGN_WITH_MSFT_KEY>
|
||||
|
@ -41,6 +42,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugType Condition=" '$(DebugType)' == '' ">pdbonly</DebugType>
|
||||
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
|
||||
<EmbedAllSource>false</EmbedAllSource>
|
||||
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' != 'VisualBasic' ">TRACE;$(DefineConstants)</DefineConstants>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' == 'VisualBasic' ">TRACE=True,$(DefineConstants)</DefineConstants>
|
||||
|
|
|
@ -122,6 +122,8 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
let mutable defineConstants : ITaskItem[] = [||]
|
||||
let mutable disabledWarnings : string = null
|
||||
let mutable documentationFile : string = null
|
||||
let mutable embedAllSources = false
|
||||
let mutable embed : string = null
|
||||
let mutable generateInterfaceFile : string = null
|
||||
let mutable keyFile : string = null
|
||||
let mutable noFramework = false
|
||||
|
@ -136,6 +138,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
let mutable referencePath : string = null
|
||||
let mutable resources : ITaskItem[] = [||]
|
||||
let mutable sources : ITaskItem[] = [||]
|
||||
let mutable sourceLink : string = null
|
||||
let mutable targetType : string = null
|
||||
#if FX_ATLEAST_35
|
||||
#else
|
||||
|
@ -183,6 +186,10 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
| "EMBEDDED" -> "embedded"
|
||||
| "FULL" -> "full"
|
||||
| _ -> null)
|
||||
if embedAllSources then
|
||||
builder.AppendSwitch("--embed+")
|
||||
builder.AppendSwitchIfNotNull("--embed:", embed)
|
||||
builder.AppendSwitchIfNotNull("--sourcelink:", sourceLink)
|
||||
// NoFramework
|
||||
if noFramework then
|
||||
builder.AppendSwitch("--noframework")
|
||||
|
@ -316,7 +323,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.DebugSymbols
|
||||
with get() = debugSymbols
|
||||
and set(b) = debugSymbols <- b
|
||||
// --debug <none/portable/pdbonly/full>: Emit debugging information
|
||||
// --debug <none/portable/embedded/pdbonly/full>: Emit debugging information
|
||||
member fsc.DebugType
|
||||
with get() = debugType
|
||||
and set(s) = debugType <- s
|
||||
|
@ -332,6 +339,12 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.DocumentationFile
|
||||
with get() = documentationFile
|
||||
and set(s) = documentationFile <- s
|
||||
member fsc.EmbedAllSources
|
||||
with get() = embedAllSources
|
||||
and set(s) = embedAllSources <- s
|
||||
member fsc.Embed
|
||||
with get() = embed
|
||||
and set(e) = embed <- e
|
||||
// --generate-interface-file <string>:
|
||||
// Print the inferred interface of the
|
||||
// assembly to a file.
|
||||
|
@ -398,6 +411,10 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.Resources
|
||||
with get() = resources
|
||||
and set(a) = resources <- a
|
||||
// SourceLink
|
||||
member fsc.SourceLink
|
||||
with get() = sourceLink
|
||||
and set(s) = sourceLink <- s
|
||||
// source files
|
||||
member fsc.Sources
|
||||
with get() = sources
|
||||
|
|
|
@ -23,6 +23,8 @@ type Fsc = class
|
|||
member DefineConstants : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member DisabledWarnings : string with get,set
|
||||
member DocumentationFile : string with get,set
|
||||
member Embed : string with get,set
|
||||
member EmbedAllSources : bool with get,set
|
||||
member GenerateInterfaceFile : string with get,set
|
||||
member KeyFile : string with get,set
|
||||
member NoFramework : bool with get,set
|
||||
|
@ -37,6 +39,7 @@ type Fsc = class
|
|||
member References : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member ReferencePath : string with get,set
|
||||
member Resources : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member SourceLink : string with get,set
|
||||
member Sources : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member TargetType : string with get,set
|
||||
#if FX_ATLEAST_35
|
||||
|
|
|
@ -160,6 +160,8 @@ this file.
|
|||
DefineConstants="$(DefineConstants)"
|
||||
DisabledWarnings="$(NoWarn)"
|
||||
DocumentationFile="$(DocumentationFile)"
|
||||
EmbedAllSources="$(EmbedAllSources)"
|
||||
Embed="$(Embed)"
|
||||
GenerateInterfaceFile="$(GenerateInterfaceFile)"
|
||||
KeyFile="$(KeyOriginatorFile)"
|
||||
LCID="$(LCID)"
|
||||
|
@ -173,6 +175,7 @@ this file.
|
|||
References="@(ReferencePath)"
|
||||
ReferencePath="$(ReferencePath)"
|
||||
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile);@(AdditionalEmbeddedResource)"
|
||||
SourceLink="$(SourceLink)"
|
||||
Sources="@(CompileBefore);@(Compile);@(CompileAfter)"
|
||||
Tailcalls="$(Tailcalls)"
|
||||
TargetType="$(OutputType)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче