Skip to content

Commit

Permalink
Increase stack size on Windows when running CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Jan 1, 2024
1 parent ebaec13 commit 3f1ce24
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@
# This file may not be copied, modified, or distributed except according to
# those terms.

if defined(windows):
# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries
switch("passL", "-Wl,--no-insert-timestamp")
# increase stack size, unless something else is setting the stack size
if not defined(windowsNoSetStack):
switch("passL", "-Wl,--stack,8388608")
# https://github.com/nim-lang/Nim/issues/4057
--tlsEmulation:off
if defined(i386):
# set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag so we can use PAE, if enabled, and access more than 2 GiB of RAM
switch("passL", "-Wl,--large-address-aware")

# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
switch("define", "nimRawSetjmp")

# begin Nimble config (version 1)
when defined(windows):
when fileExists("nimble-win.paths"):
Expand Down
2 changes: 1 addition & 1 deletion json_serialization.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let verbose = getEnv("V", "") notin ["", "0"]
let cfg =
" --styleCheck:usages --styleCheck:error" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f" &
" --outdir:build --nimcache:build/nimcache -f" &
" -d:nimOldCaseObjects"

proc build(args, path: string) =
Expand Down

0 comments on commit 3f1ce24

Please sign in to comment.