Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions examples/with_prelude/test_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
2 changes: 1 addition & 1 deletion prelude/haskell/haskell.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down