Skip to content

Commit f52f4b5

Browse files
ctaggartKevinRansom
authored andcommitted
add deterministic to msbuild targets (#6363)
* add deterministic to msbuild targets * default to false; add property
1 parent f996ac5 commit f52f4b5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/fsharp/FSharp.Build/Fsc.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type public Fsc () as this =
3030
let mutable debugType : string = null
3131
let mutable defineConstants : ITaskItem[] = [||]
3232
let mutable delaySign : bool = false
33+
let mutable deterministic : bool = false
3334
let mutable disabledWarnings : string = null
3435
let mutable documentationFile : string = null
3536
let mutable dotnetFscCompilerPath : string = null
@@ -234,6 +235,9 @@ type public Fsc () as this =
234235

235236
builder.AppendSwitch("--nocopyfsharpcore")
236237

238+
if deterministic then
239+
builder.AppendSwitch("--deterministic+")
240+
237241
// OtherFlags - must be second-to-last
238242
builder.AppendSwitchUnquotedIfNotNull("", otherFlags)
239243
capturedArguments <- builder.CapturedArguments()
@@ -264,6 +268,10 @@ type public Fsc () as this =
264268
with get() = debugType
265269
and set(s) = debugType <- s
266270

271+
member fsc.Deterministic
272+
with get() = deterministic
273+
and set(p) = deterministic <- p
274+
267275
member fsc.DelaySign
268276
with get() = delaySign
269277
and set(s) = delaySign <- s

src/fsharp/FSharp.Build/Microsoft.FSharp.Targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ this file.
281281
DebugType="$(DebugType)"
282282
DefineConstants="$(DefineConstants)"
283283
DelaySign="$(DelaySign)"
284+
Deterministic="$(Deterministic)"
284285
DisabledWarnings="$(NoWarn)"
285286
DocumentationFile="$(DocumentationFile)"
286287
DotnetFscCompilerPath="$(DotnetFscCompilerPath)"

0 commit comments

Comments
 (0)