Skip to content

Commit

Permalink
ci: windows: fix build with secp256k1 0.4.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Jul 28, 2024
1 parent 2758bb0 commit 0dbd874
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
cabal configure --disable-documentation --enable-executable-static --enable-executable-stripping \
--extra-include-dirs="$HOME/.local/include" --extra-lib-dirs="$HOME/.local/lib" \
--extra-include-dirs="D:/a/_temp/msys64/clang64/include" --extra-lib-dirs="D:/a/_temp/msys64/clang64/lib" \
--ghc-options=-pgml=D:/a/_temp/msys64/clang64/bin/clang.exe
--ghc-options=-pgml=D:/a/_temp/msys64/clang64/bin/clang.exe -fstatic-secp256k1
cabal build --dry-run
# The last step generates dist-newstyle/cache/plan.json for the cache key.
Expand Down
8 changes: 8 additions & 0 deletions hevm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ extra-source-files:
extra-doc-files:
CHANGELOG.md

flag static-secp256k1
description: Sets flags for compilation with static secp256k1
default: False
manual: True

flag ci
description: Sets flags for compilation in CI
default: False
Expand Down Expand Up @@ -111,6 +116,9 @@ library
Paths_hevm
autogen-modules:
Paths_hevm
if os(windows) && flag(static-secp256k1)
cc-options: -DSECP256K1_STATIC
cxx-options: -DSECP256K1_STATIC
if os(darwin)
-- https://gitlab.haskell.org/ghc/ghc/-/issues/11829
ld-options: -Wl,-keep_dwarf_unwind
Expand Down

0 comments on commit 0dbd874

Please sign in to comment.