Skip to content

Commit

Permalink
Support exported_post_linker_flags in prebuilt_haskell_library
Browse files Browse the repository at this point in the history
Summary:
As per other rules, support linker flags to put at the end of
the linkable

Reviewed By: shayne-fletcher

Differential Revision: D58766267

fbshipit-source-id: 6663c4b8e8ae01aac313a08b83d706289824eaff
  • Loading branch information
andrewjcg authored and facebook-github-bot committed Jun 20, 2024
1 parent d835d86 commit 44390c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions prelude/decls/haskell_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ haskell_prebuilt_library = prelude_rule(
} |
haskell_common.exported_linker_flags_arg() |
{
"exported_post_linker_flags": attrs.list(attrs.arg(anon_target_compatible = True), default = []),
"contacts": attrs.list(attrs.string(), default = []),
"cxx_header_dirs": attrs.list(attrs.source(), default = []),
"db": attrs.source(),
Expand Down
2 changes: 2 additions & 0 deletions prelude/haskell/haskell.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,14 @@ def haskell_prebuilt_library_impl(ctx: AnalysisContext) -> list[Provider]:
link_infos[link_style] = LinkInfos(
default = LinkInfo(
pre_flags = ctx.attrs.exported_linker_flags,
post_flags = ctx.attrs.exported_post_linker_flags,
linkables = linkables,
),
)
prof_link_infos[link_style] = LinkInfos(
default = LinkInfo(
pre_flags = ctx.attrs.exported_linker_flags,
post_flags = ctx.attrs.exported_post_linker_flags,
linkables = prof_linkables,
),
)
Expand Down

0 comments on commit 44390c4

Please sign in to comment.