From f65218dd3502ee6164534b85858fab819ef80c8b Mon Sep 17 00:00:00 2001 From: Miran Date: Tue, 28 Jun 2022 14:50:51 +0200 Subject: [PATCH] move `-d:nimRawSetjmp` to config.nims (#137) * move `-d:nimRawSetjmp` to config.nims Refs https://github.com/status-im/nimbus-build-system/issues/44 * not vcc * use .cfg not .nims --- .github/workflows/ci.yml | 4 ---- nim.cfg | 5 +++++ tests/nim.cfg | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 nim.cfg create mode 100644 tests/nim.cfg diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e0bec5..acd02f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,10 +153,6 @@ jobs: - name: Run tests shell: bash 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 nimble install -y --depsOnly diff --git a/nim.cfg b/nim.cfg new file mode 100644 index 0000000..371f6d7 --- /dev/null +++ b/nim.cfg @@ -0,0 +1,5 @@ +# Avoid some rare stack corruption while using exceptions with a SEH-enabled +# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121 +@if windows and not vcc: + --define:nimRawSetjmp +@end diff --git a/tests/nim.cfg b/tests/nim.cfg new file mode 100644 index 0000000..371f6d7 --- /dev/null +++ b/tests/nim.cfg @@ -0,0 +1,5 @@ +# Avoid some rare stack corruption while using exceptions with a SEH-enabled +# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121 +@if windows and not vcc: + --define:nimRawSetjmp +@end