diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets
index 455357f0a2c..284fac3fcba 100644
--- a/src/FSharpSource.Settings.targets
+++ b/src/FSharpSource.Settings.targets
@@ -32,8 +32,9 @@
embedded
false
prompt
- $(OtherFlags) --no-jit-optimize
- $(OtherFlags) --no-jit-optimize --embed
+ $(OtherFlags) --no-jit-optimize
+ true
+ $(IntermediateOutputPath)source_link.json
DEBUG;TRACE;CODE_ANALYSIS;$(DefineConstants)
DEBUG=True,TRACE=True,CODE_ANALYSIS=True,$(DefineConstants)
false
@@ -42,6 +43,7 @@
pdbonly
true
+ false
prompt
TRACE;$(DefineConstants)
TRACE=True,$(DefineConstants)
diff --git a/src/fsharp/FSharp.Build/Fsc.fs b/src/fsharp/FSharp.Build/Fsc.fs
index 583fa2bf62f..df5a6826a6f 100644
--- a/src/fsharp/FSharp.Build/Fsc.fs
+++ b/src/fsharp/FSharp.Build/Fsc.fs
@@ -122,6 +122,8 @@ type [ "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 [: Emit debugging information
+ // --debug : Emit debugging information
member fsc.DebugType
with get() = debugType
and set(s) = debugType <- s
@@ -332,6 +339,12 @@ type [:
// Print the inferred interface of the
// assembly to a file.
@@ -398,6 +411,10 @@ type [