Skip to content

Commit

Permalink
Allow consumers to set always_include_developer_search_paths in swift…
Browse files Browse the repository at this point in the history
thiagohmcruz authored Mar 25, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 144eb18 commit da630a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rules/library.bzl
Original file line number Diff line number Diff line change
@@ -579,6 +579,7 @@ def apple_library(
testonly = kwargs.pop("testonly", False)
features = kwargs.pop("features", [])
plugins = kwargs.pop("plugins", None)
always_include_developer_search_paths = kwargs.pop("always_include_developer_search_paths", None)

for (k, v) in {"momc_copts": momc_copts, "mapc_copts": mapc_copts, "ibtool_copts": ibtool_copts}.items():
if v:
@@ -957,8 +958,15 @@ def apple_library(
)

if swift_sources:
swift_kwargs = kwargs

# To be backward compatible with rules_apple 2.x
swift_kwargs = dicts.add(kwargs, {"plugins": plugins} if plugins else {})
if plugins:
swift_kwargs = dicts.add(swift_kwargs, {"plugins": plugins})

# Allow consumers to opt-in to https://github.com/bazelbuild/rules_swift/pull/1162
if always_include_developer_search_paths:
swift_kwargs = dicts.add(swift_kwargs, {"always_include_developer_search_paths": always_include_developer_search_paths})

swift_library(
name = swift_libname,

0 comments on commit da630a2

Please sign in to comment.