From ad2cbb4518d8529c1c288e39833f3c10132f0f91 Mon Sep 17 00:00:00 2001 From: Kyle Butt Date: Sun, 7 Apr 2024 11:15:58 -0600 Subject: [PATCH] Make static linking of haskell_cabal_binary explicit The runtime dependency resolution for `haskell_cabal_binary` doesn't currently support dynamically linked haskell libraries, and expects executables built by `haskell_cabal_binary` to be statically linked to haskell dependencies. Make that explicit by an option to cabal. --- haskell/cabal.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell/cabal.bzl b/haskell/cabal.bzl index e8077c1ab..4351927fb 100644 --- a/haskell/cabal.bzl +++ b/haskell/cabal.bzl @@ -2136,7 +2136,7 @@ haskell_cabal_binary( setup_deps = {setup_deps}, tools = {tools}, visibility = ["@{workspace}-exe//{name}:__pkg__"], - cabalopts = ["--ghc-option=-w", "--ghc-option=-optF=-w"], + cabalopts = ["--ghc-option=-w", "--ghc-option=-optF=-w", "--ghc-option=-static"], verbose = {verbose}, ) """.format(