diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a487b83f..4fd860650 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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. diff --git a/hevm.cabal b/hevm.cabal index 0cbe6000d..558958dd2 100644 --- a/hevm.cabal +++ b/hevm.cabal @@ -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 @@ -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