Skip to content

Commit 99632e3

Browse files
authored
Handle multiple alwayslink error in objc_library (#938)
1 parent 6aa4540 commit 99632e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rules/library.bzl

+2-1
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ def apple_library(
11061106
if module_map:
11071107
objc_hdrs.append(module_map)
11081108

1109+
default_alwayslink = kwargs.pop("alwayslink", True) # ensure symbols from any static deps are always included (see https://github.com/bazelbuild/rules_apple/issues/1938)
11091110
native.objc_library(
11101111
name = objc_libname,
11111112
srcs = objc_sources + objc_private_hdrs + objc_non_exported_hdrs,
@@ -1124,7 +1125,7 @@ def apple_library(
11241125
defines = defines + objc_defines,
11251126
testonly = testonly,
11261127
features = features,
1127-
alwayslink = True, # ensure symbols from any static deps are always included (see https://github.com/bazelbuild/rules_apple/issues/1938)
1128+
alwayslink = default_alwayslink,
11281129
**kwargs
11291130
)
11301131
launch_screen_storyboard_name = name + "_launch_screen_storyboard"

0 commit comments

Comments
 (0)