completes #12799, fixes #12216 (#12870)

This commit is contained in:
Andreas Rumpf
2019-12-10 12:09:48 +01:00
committed by GitHub
parent 13d232ec56
commit 61d89aae11

View File

@@ -539,6 +539,7 @@ proc assignGlobalVar(p: BProc, n: PNode; value: Rope) =
decl.addf "NIM_ALIGN($1) ", [rope(s.alignment)]
if p.hcrOn: decl.add("static ")
elif sfImportc in s.flags: decl.add("extern ")
if s.kind == skLet and value != nil: decl.add("NIM_CONST ")
decl.add(td)
if p.hcrOn: decl.add("*")
if sfRegister in s.flags: decl.add(" register")