Skip to content

Commit b738b87

Browse files
committed
ci: windows: fix build with secp256k1 0.4.0+
See bitcoin-core/secp256k1#1367
1 parent f65c91f commit b738b87

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
cabal configure --disable-documentation --enable-executable-static --enable-executable-stripping \
125125
--extra-include-dirs="$HOME/.local/include" --extra-lib-dirs="$HOME/.local/lib" \
126126
--extra-include-dirs="D:/a/_temp/msys64/clang64/include" --extra-lib-dirs="D:/a/_temp/msys64/clang64/lib" \
127-
--ghc-options=-pgml=D:/a/_temp/msys64/clang64/bin/clang.exe
127+
--ghc-options=-pgml=D:/a/_temp/msys64/clang64/bin/clang.exe -fstatic-secp256k1
128128
cabal build --dry-run
129129
# The last step generates dist-newstyle/cache/plan.json for the cache key.
130130

hevm.cabal

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ extra-source-files:
2525
extra-doc-files:
2626
CHANGELOG.md
2727

28+
flag static-secp256k1
29+
description: Sets flags for compilation with static secp256k1
30+
default: False
31+
manual: True
32+
2833
flag ci
2934
description: Sets flags for compilation in CI
3035
default: False
@@ -111,6 +116,9 @@ library
111116
Paths_hevm
112117
autogen-modules:
113118
Paths_hevm
119+
if os(windows) && flag(static-secp256k1)
120+
cc-options: -DSECP256K1_STATIC
121+
cxx-options: -DSECP256K1_STATIC
114122
if os(darwin)
115123
-- https://gitlab.haskell.org/ghc/ghc/-/issues/11829
116124
ld-options: -Wl,-keep_dwarf_unwind

0 commit comments

Comments
 (0)