Skip to content

Commit

Permalink
Handle multiple alwayslink error in objc_library (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaradp authored Jan 21, 2025
1 parent 6aa4540 commit 99632e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rules/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,7 @@ def apple_library(
if module_map:
objc_hdrs.append(module_map)

default_alwayslink = kwargs.pop("alwayslink", True) # ensure symbols from any static deps are always included (see https://github.com/bazelbuild/rules_apple/issues/1938)
native.objc_library(
name = objc_libname,
srcs = objc_sources + objc_private_hdrs + objc_non_exported_hdrs,
Expand All @@ -1124,7 +1125,7 @@ def apple_library(
defines = defines + objc_defines,
testonly = testonly,
features = features,
alwayslink = True, # ensure symbols from any static deps are always included (see https://github.com/bazelbuild/rules_apple/issues/1938)
alwayslink = default_alwayslink,
**kwargs
)
launch_screen_storyboard_name = name + "_launch_screen_storyboard"
Expand Down

0 comments on commit 99632e3

Please sign in to comment.