incremental compilation: simple recompilation works
This commit is contained in:
parent
1e08fff2d5
commit
6acffcd28f
4 changed files with 11 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ proc compileModule*(graph: ModuleGraph; fileIdx: FileIndex; flags: TSymFlags): P
|
|||
graph.config.mainPackageId = result.owner.id
|
||||
|
||||
result.id = getModuleId(graph, fileIdx, AbsoluteFile toFullPath(graph.config, fileIdx))
|
||||
registerModule(graph, result)
|
||||
discard processModule(graph, result,
|
||||
if sfMainModule in flags and graph.config.projectIsStdin: stdin.llStreamOpen else: nil)
|
||||
elif graph.isDirty(result):
|
||||
|
|
@ -128,6 +129,7 @@ proc compileProject*(graph: ModuleGraph; projectFileIdx = InvalidFileIDX) =
|
|||
proc makeModule*(graph: ModuleGraph; filename: AbsoluteFile): PSym =
|
||||
result = graph.newModule(fileInfoIdx(graph.config, filename))
|
||||
result.id = getID()
|
||||
registerModule(graph, result)
|
||||
|
||||
proc makeModule*(graph: ModuleGraph; filename: string): PSym =
|
||||
result = makeModule(graph, AbsoluteFile filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue