Skip to content

Commit

Permalink
Choose archive style based on pic_behavior
Browse files Browse the repository at this point in the history
Summary: Some services cannot tolerate pic by default.

Reviewed By: aleivag

Differential Revision: D69860279

fbshipit-source-id: edec965856028b9ade4a653aa6a0799c3eee0bf9
  • Loading branch information
Christy Lee-Eusman authored and facebook-github-bot committed Feb 19, 2025
1 parent f1f4054 commit ba1cc25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prelude/cxx/link_groups.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ load(
"LinkStrategy",
"LinkedObject", # @unused Used as a type
"SharedLibLinkable",
"get_lib_output_style",
"set_link_info_link_whole",
"wrap_link_info",
"wrap_with_no_as_needed_shared_libs_flags",
Expand Down Expand Up @@ -537,7 +538,7 @@ def get_filtered_labels_to_links_map(

filtered_groups = [None, NO_MATCH_LABEL, MATCH_ALL_LABEL]

output_style = LibOutputStyle("pic_archive") if build_context.link_strategy != LinkStrategy("shared") else LibOutputStyle("shared_lib")
output_style = get_lib_output_style(build_context.link_strategy, Linkage("any"), build_context.pic_behavior) if build_context.link_strategy != LinkStrategy("shared") else LibOutputStyle("shared_lib")

for target in linkables:
node = build_context.linkable_graph.nodes[target]
Expand Down

0 comments on commit ba1cc25

Please sign in to comment.