Skip to content

Commit

Permalink
Don't bundle the umbrella header if there is only one public header
Browse files Browse the repository at this point in the history
which already has the same name
  • Loading branch information
thii committed May 10, 2019
1 parent 3808adf commit ef393ce
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions apple/internal/partials/static_framework_header_modulemap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,16 @@ def _static_framework_header_modulemap_partial_impl(ctx, hdrs, binary_objc_provi
sorted(hdrs),
)

bundle_files.append(
(processor.location.bundle, "Headers", depset(hdrs + [umbrella_header_file])),
)
# Don't bundle the umbrella header if there is only one public header
# which has the same name
if len(hdrs) == 1 and hdrs[0].basename == umbrella_header_name:
bundle_files.append(
(processor.location.bundle, "Headers", depset(hdrs)),
)
else:
bundle_files.append(
(processor.location.bundle, "Headers", depset(hdrs + [umbrella_header_file])),
)
else:
umbrella_header_name = None

Expand Down

0 comments on commit ef393ce

Please sign in to comment.