From 88f7ae6287a930d267b994a77543ea23faa9401d Mon Sep 17 00:00:00 2001 From: araq Date: Wed, 26 Nov 2025 08:53:51 +0100 Subject: [PATCH] hello world works --- compiler/ccgexprs.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index ea4db4f516..20b1db25e6 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -3483,6 +3483,12 @@ proc expr(p: BProc, n: PNode, d: var TLoc) = var lit = newBuilder("") genLiteral(p, sym.astdef, sym.typ, lit) putIntoDest(p, d, n, extract(lit), OnStatic) + elif optCompress in p.config.globalOptions: + # With delayed codegen, we need to ensure the definition is generated + # not just the extern header declaration + requestConstImpl(p, sym) + assert((sym.loc.snippet != "") and (sym.loc.t != nil)) + putLocIntoDest(p, d, sym.loc) elif delayedCodegen(p.module): genConstHeader(p.module, p.module, p, sym) assert((sym.loc.snippet != "") and (sym.loc.t != nil))