fixes #10625; setjmp on linux mangles ebp leading to early collection (#24787)

fixes #10625

(cherry picked from commit 7c5d005510)
This commit is contained in:
ringabout
2025-03-18 18:51:34 +08:00
committed by narimiran
parent d01002d8f8
commit 4610c2b314

View File

@@ -452,6 +452,11 @@ proc noAbsolutePaths(conf: ConfigRef): bool {.inline.} =
proc cFileSpecificOptions(conf: ConfigRef; nimname, fullNimFile: string): string =
result = conf.compileOptions
if (conf.cCompiler == ccGcc or conf.cCompiler == ccCLang) and
conf.selectedGC == gcRefc:
# bug #10625
addOpt(result, "-fno-omit-frame-pointer")
for option in conf.compileOptionsCmd:
if strutils.find(result, option, 0) < 0:
addOpt(result, option)