diff --git a/examples/with_prelude/test_utils.bzl b/examples/with_prelude/test_utils.bzl index cc5a531e6c799..764c3bb342ac9 100644 --- a/examples/with_prelude/test_utils.bzl +++ b/examples/with_prelude/test_utils.bzl @@ -17,10 +17,8 @@ def assert_output(name, command, output): def haskell_library(deps = [], **kwargs): native.haskell_library(deps = deps + ["//third-party/haskell:base"], **kwargs) -def haskell_binary(linker_flags = [], deps = [], **kwargs): +def haskell_binary(deps = [], **kwargs): native.haskell_binary( - # Workaround for as yet not triaged runtime segfault. - linker_flags = linker_flags + ["-dynamic"] if host_info().os.is_macos else linker_flags, deps = deps + ["//third-party/haskell:base"], **kwargs, ) diff --git a/prelude/haskell/haskell.bzl b/prelude/haskell/haskell.bzl index 3b15154259bdd..0204a4bad4ab7 100644 --- a/prelude/haskell/haskell.bzl +++ b/prelude/haskell/haskell.bzl @@ -1133,7 +1133,7 @@ def haskell_binary_impl(ctx: AnalysisContext) -> list[Provider]: sos_dir = "__{}__shared_libs_symlink_tree".format(ctx.attrs.name) rpath_ref = get_rpath_origin(get_cxx_toolchain_info(ctx).linker_info.type) rpath_ldflag = "-Wl,{}/{}".format(rpath_ref, sos_dir) - link.add("-optl", "-Wl,-rpath", "-optl", rpath_ldflag) + link.add("-dynamic", "-optl", "-Wl,-rpath", "-optl", rpath_ldflag) symlink_dir = create_shlib_symlink_tree( actions = ctx.actions, out = sos_dir,