blob: 211e484cc6b16a6dc85e15d1c85227101d96425f [file] [log] [blame] [edit]
diff --git a/compiler/options.nim b/compiler/options.nim
index b4d2bb64e..05bc696e4 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -465,7 +465,8 @@ proc setDefaultLibpath*(conf: ConfigRef) =
else:
conf.libpath = prefix / RelativeDir"lib"
else:
- conf.libpath = prefix / RelativeDir"lib"
+ conf.libpath = prefix / RelativeDir"lib/nim"
+ if not existsDir(conf.libpath.string): conf.libpath = prefix / RelativeDir"lib"
# Special rule to support other tools (nimble) which import the compiler
# modules and make use of them.