Skip to content

Commit

Permalink
Add wheel_linker_flags to python toolchain
Browse files Browse the repository at this point in the history
Summary: Allow setting linker flags specific to `python_wheel` rules.

Reviewed By: fduwjj, manav-a

Differential Revision: D63904190

fbshipit-source-id: cf6edb767746117dc02e28fe1665c2db82a7ad78
  • Loading branch information
andrewjcg authored and facebook-github-bot committed Oct 5, 2024
1 parent 20c2a84 commit 025434e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/python_wheel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def _impl(ctx: AnalysisContext) -> list[Provider]:
opts = link_options(
links = [
LinkArgs(flags = python_toolchain.extension_linker_flags),
LinkArgs(flags = python_toolchain.wheel_linker_flags),
LinkArgs(infos = inputs),
],
category_suffix = "native_extension",
Expand Down
1 change: 1 addition & 0 deletions python/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ PythonToolchainInfo = provider(
"linker_flags": provider_field(typing.Any, default = None),
"binary_linker_flags": provider_field(typing.Any, default = None),
"extension_linker_flags": provider_field(typing.Any, default = None),
"wheel_linker_flags": provider_field(list[typing.Any], default = []),
"generate_static_extension_info": provider_field(typing.Any, default = None),
"parse_imports": provider_field(typing.Any, default = None),
"traverse_dep_manifest": provider_field(typing.Any, default = None),
Expand Down

0 comments on commit 025434e

Please sign in to comment.