F# portable debugging (#5531)
[mono.git] / packaging / MacSDK / patches / fsharp-portable-pdb.patch
diff --git a/packaging/MacSDK/patches/fsharp-portable-pdb.patch b/packaging/MacSDK/patches/fsharp-portable-pdb.patch
new file mode 100644 (file)
index 0000000..3ced495
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
+index 34d716485..ec99e87ed 100644
+--- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
++++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
+@@ -41,6 +41,16 @@ this file.
+         <RootNamespace Condition="'$(RootNamespace)'==''">RootNamespace</RootNamespace>
+         <Actual32Bit Condition="'$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0'">false</Actual32Bit>
+         <Actual32Bit Condition="!('$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0')">$(Prefer32Bit)</Actual32Bit>
++        <!--
++             `/debug+` is produced based on `$(DebugSymols)`, which gets a default value of 'true' in
++             Microsoft.Common.CurrentVersion.targets, with a condition:
++               Condition=" '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'=='' "
++             But that file is imported later, so we cannot depend on the default value of `$(DebugSymbols)` or `$(ConfigurationName)`.
++        -->
++        <_ConfigurationNameTmp>$(ConfigurationName)</_ConfigurationNameTmp>
++        <_ConfigurationNameTmp Condition="'$(ConfigurationName)' == ''">$(Configuration)</_ConfigurationNameTmp>
++
++        <DebugType Condition="'$(OS)' != 'Windows_NT' And ('$(DebugSymbols)'=='True' or ('$(DebugSymbols)'=='' And '$(_ConfigurationNameTmp)'=='Debug'))">portable</DebugType>
+     </PropertyGroup>
+     <!--