Skip to content

Commit

Permalink
Windows: enable nimRawSetjmp by default
Browse files Browse the repository at this point in the history
See nim-lang#19197. The default setjmp can randomly segfault on windows
  • Loading branch information
Menduist committed Jun 13, 2022
1 parent a4fdaa8 commit 2cc6526
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ when defined(nimStrictMode):
switch("hintAsError", "ConvFromXtoItselfNotNeeded")
# future work: XDeclaredButNotUsed

when defined(windows) and (NimMajor, NimMinor) > (1, 0):
# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/nim-lang/Nim/pull/19197
switch("define", "nimRawSetjmp")

switch("define", "nimVersion:" & NimVersion)
switch("define", "nimPreviewDotLikeOps")

0 comments on commit 2cc6526

Please sign in to comment.