arc: do not unload globals when building a library [backport:1.2] (#14180)
This commit is contained in:
parent
33e9ac7cd3
commit
d5fc35c968
1 changed files with 3 additions and 2 deletions
|
|
@ -2019,6 +2019,7 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode =
|
||||||
if m.config.exc == excGoto and getCompilerProc(graph, "nimTestErrorFlag") != nil:
|
if m.config.exc == excGoto and getCompilerProc(graph, "nimTestErrorFlag") != nil:
|
||||||
discard cgsym(m, "nimTestErrorFlag")
|
discard cgsym(m, "nimTestErrorFlag")
|
||||||
|
|
||||||
|
if {optGenStaticLib, optGenDynLib} * m.config.globalOptions == {}:
|
||||||
for i in countdown(high(graph.globalDestructors), 0):
|
for i in countdown(high(graph.globalDestructors), 0):
|
||||||
n.add graph.globalDestructors[i]
|
n.add graph.globalDestructors[i]
|
||||||
if passes.skipCodegen(m.config, n): return
|
if passes.skipCodegen(m.config, n): return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue