diff options
Diffstat (limited to 'compiler/passes.nim')
-rw-r--r-- | compiler/passes.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/passes.nim b/compiler/passes.nim index 7effcfeb5..82314b789 100644 --- a/compiler/passes.nim +++ b/compiler/passes.nim @@ -112,6 +112,14 @@ const nkMacroDef, nkConverterDef, nkIteratorDef, nkFuncDef, nkPragma, nkExportStmt, nkExportExceptStmt, nkFromStmt, nkImportStmt, nkImportExceptStmt} +proc prepareConfigNotes(graph: ModuleGraph; module: PSym) = + # don't be verbose unless the module belongs to the main package: + if module.owner.id == graph.config.mainPackageId: + graph.config.notes = graph.config.mainPackageNotes + else: + if graph.config.mainPackageNotes == {}: graph.config.mainPackageNotes = graph.config.notes + graph.config.notes = graph.config.foreignPackageNotes + proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool {.discardable.} = if graph.stopCompile(): return true var @@ -119,6 +127,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool { a: TPassContextArray s: PLLStream fileIdx = module.fileIdx + prepareConfigNotes(graph, module) if module.id < 0: # new module caching mechanism: for i in 0 ..< graph.passes.len: |