Skip to content

Commit

Permalink
fixes #16249 [backport:1.4] (#16251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored Dec 4, 2020
1 parent edce589 commit 8178388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/cgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8178388

Please sign in to comment.