Skip to content

Commit

Permalink
Switch to use the cxx.link_style to define the default
Browse files Browse the repository at this point in the history
Summary:
Configure the LinkerInfo in toolchain impl via attr.

#buildmore

Reviewed By: milend

Differential Revision: D51861188

fbshipit-source-id: 3f09350332954aa652476315f59a8a67b54dbe94
  • Loading branch information
mzlee authored and facebook-github-bot committed Dec 7, 2023
1 parent 6f69c08 commit 4239681
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion prelude/cxx/cxx_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def cxx_toolchain_impl(ctx):
is_pdb_generated = is_pdb_generated(ctx.attrs.linker_type, ctx.attrs.linker_flags),
link_binaries_locally = not value_or(ctx.attrs.cache_links, True),
link_libraries_locally = False,
link_style = LinkStyle("static"),
link_style = LinkStyle(ctx.attrs.link_style),
link_weight = 1,
link_ordering = ctx.attrs.link_ordering,
linker = ctx.attrs.linker[RunInfo],
Expand Down
1 change: 1 addition & 0 deletions prelude/decls/cxx_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ cxx_toolchain = prelude_rule(
"labels": attrs.list(attrs.string(), default = []),
"licenses": attrs.list(attrs.source(), default = []),
"link_path_normalization_args_enabled": attrs.bool(default = False),
"link_style": attrs.string(default = "static"),
"linker": attrs.source(),
"linker_flags": attrs.list(attrs.arg(anon_target_compatible = True), default = []),
"linker_type": attrs.enum(LinkerProviderType),
Expand Down

0 comments on commit 4239681

Please sign in to comment.