Skip to content

Commit d9f3790

Browse files
committed
fixes to path search for facades and API
1 parent ceaad58 commit d9f3790

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/fsharp/CompileOps.fs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,10 +2770,17 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
27702770
[tcConfig.MakePathAbsolute x]
27712771
| None ->
27722772
#if ENABLE_MONO_SUPPORT
2773-
// When running on Mono we lead everyone to believe we're doing .NET 4.0 compilation
2774-
// by default. Why? See https://github.com/fsharp/fsharp/issues/99
27752773
if runningOnMono then
2776-
[System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()]
2774+
[ let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
2775+
let runtimeRootWithoutSlash = runtimeRoot.TrimEnd('/', '\\')
2776+
let api = runtimeRootWithoutSlash + "-api"
2777+
if Directory.Exists(api) then
2778+
yield api
2779+
let apiFacades = Path.Combine(api, "Facades")
2780+
if Directory.Exists(apiFacades) then
2781+
yield apiFacades
2782+
yield runtimeRoot
2783+
]
27772784
else
27782785
#endif
27792786
try

0 commit comments

Comments
 (0)