fixes #16249 [backport:1.4] (#16251)

This commit is contained in:
Andreas Rumpf 2020-12-05 00:36:06 +01:00 • committed by GitHub
commit 8178388a78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2044,7 +2044,7 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode =
if m.config.exc == excGoto and getCompilerProc(graph, "nimTestErrorFlag") != nil:
discard cgsym(m, "nimTestErrorFlag")
if {optGenStaticLib, optGenDynLib} * m.config.globalOptions == {}:
if {optGenStaticLib, optGenDynLib, optNoMain} * m.config.globalOptions == {}:
for i in countdown(high(graph.globalDestructors), 0):
n.add graph.globalDestructors[i]
if passes.skipCodegen(m.config, n): return