File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,17 @@ open Microsoft.FSharp.Compiler.AbstractIL
1313open Microsoft.FSharp .Compiler .AbstractIL .Internal
1414open Microsoft.FSharp .Compiler .AbstractIL .Internal .Library
1515open Microsoft.FSharp .Compiler .AbstractIL .Diagnostics
16+ open System
1617open System.Collections .Generic
1718open System.Collections
1819
1920let logging = false
2021
22+ let runningOnWindows =
23+ match System.Environment.OSVersion.Platform with
24+ | PlatformID.Win32NT | PlatformID.Win32S | PlatformID.Win32Windows | PlatformID.WinCE -> true
25+ | _ -> false
26+
2127// Officially supported way to detect if we are running on Mono.
2228// See http://www.mono-project.com/FAQ:_Technical
2329// "How can I detect if am running in Mono?" section
Original file line number Diff line number Diff line change @@ -2275,6 +2275,7 @@ type ILPropertyRef =
22752275 member Name : string
22762276 interface System.IComparable
22772277
2278+ val runningOnWindows : bool
22782279val runningOnMono : bool
22792280
22802281type ILReferences =
Original file line number Diff line number Diff line change @@ -3971,7 +3971,7 @@ let ClosePdbReader pdb =
39713971#endif
39723972
39733973let OpenILModuleReader infile opts =
3974- if not IL.runningOnMono then
3974+ if IL.runningOnWindows then
39753975 let mmap = MemoryMappedFile.Create infile
39763976 let modul , ilAssemblyRefs , pdb = genOpenBinaryReader infile mmap opts
39773977 { modul = modul;
You can’t perform that action at this time.
0 commit comments