make Nim take roughly 100MB less RAM for bootstrapping via a new compiler switch -d:leanCompiler; useful for the Raberry PI

This commit is contained in:
Andreas Rumpf 2018-11-07 18:36:45 +01:00
commit cb4d810659
8 changed files with 110 additions and 63 deletions

View file

@ -115,7 +115,7 @@ proc symToSuggest(conf: ConfigRef; s: PSym, isLocal: bool, section: IdeCmd, info
result.forth = typeToString(s.typ)
else:
result.forth = ""
when defined(nimsuggest) and not defined(noDocgen):
when defined(nimsuggest) and not defined(noDocgen) and not defined(leanCompiler):
result.doc = s.extractDocComment
let infox = if section in {ideUse, ideHighlight, ideOutline}: info else: s.info
result.filePath = toFullPath(conf, infox)
@ -153,7 +153,7 @@ proc `$`*(suggest: Suggest): string =
result.add(sep)
result.add($suggest.column)
result.add(sep)
when defined(nimsuggest) and not defined(noDocgen):
when defined(nimsuggest) and not defined(noDocgen) and not defined(leanCompiler):
result.add(suggest.doc.escape)
if suggest.version == 0:
result.add(sep)