Skip to content

Commit

Permalink
Parse "-Wl,-framework,<framework>" in get_sdk_frameworks
Browse files Browse the repository at this point in the history
With
bazelbuild/bazel@977d7fb,
bazel may generate "-Wl,-framework,<framework>" linkargs for objc_library, so
add support for it.

PiperOrigin-RevId: 480790731
  • Loading branch information
googlewalt authored and swiple-rules-gardener committed Oct 13, 2022
1 parent 5a684a6 commit 608ae26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apple/internal/cc_info_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def _get_sdk_frameworks(*, deps, split_deps_keys = []):
for index, user_link_flag in enumerate(linker_input.user_link_flags):
if user_link_flag == "-framework":
sdk_frameworks.append(linker_input.user_link_flags[index + 1])
elif user_link_flag.startswith("-Wl,-framework,"):
sdk_frameworks.append(user_link_flag.split(",")[-1])

return depset(sdk_frameworks)

Expand Down

1 comment on commit 608ae26

@thii
Copy link
Member

@thii thii commented on 608ae26 Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.