move `-d:nimRawSetjmp` to config.nim

Refs https://github.com/status-im/nimbus-build-system/issues/44
This commit is contained in:
narimiran 2022-06-15 14:41:58 +02:00
parent 419903c9a3
commit 8cd4ccdc28
No known key found for this signature in database
GPG Key ID: 858F5E6FB71FD8F5
3 changed files with 8 additions and 4 deletions

View File

@ -149,10 +149,6 @@ jobs:
- name: Run tests
run: |
if [[ "${{ matrix.target.os }}" == "windows" ]]; then
# https://github.com/status-im/nimbus-eth2/issues/3121
export NIMFLAGS="-d:nimRawSetjmp"
fi
nim --version
nimble --version
env TEST_LANG=c nimble test

4
config.nims Normal file
View File

@ -0,0 +1,4 @@
if defined(windows):
# 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")

4
tests/config.nims Normal file
View File

@ -0,0 +1,4 @@
if defined(windows):
# 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")