This commit is contained in:
araq
2025-11-26 18:32:27 +01:00
parent 7ddc09cd38
commit 49df65c58c
2 changed files with 6 additions and 0 deletions

View File

@@ -951,6 +951,10 @@ proc populateInterfaceTablesFromIndex(c: var DecodeContext; module: FileIndex;
if sym != nil:
strTableAdd(interfHidden, sym)
proc toNifFilename*(conf: ConfigRef; f: FileIndex): string =
let suffix = moduleSuffix(conf, f)
result = toGeneratedFile(conf, AbsoluteFile(suffix), ".nif").string
proc loadNifModule*(c: var DecodeContext; f: FileIndex; interf, interfHidden: var TStrTable): PNode =
let suffix = moduleSuffix(c.infos.config, f)
let modFile = toGeneratedFile(c.infos.config, AbsoluteFile(suffix), ".nif").string

View File

@@ -753,6 +753,8 @@ when not defined(nimKochBootstrap):
## Loads module from NIF file when optCompress is enabled.
# loadNifModule will check if the file exists internally
if not fileExists(toNifFilename(g.config, fileIdx)):
return nil
# Create module symbol
let filename = AbsoluteFile toFullPath(g.config, fileIdx)