Skip to content

Commit 4721cd0

Browse files
committed
Support Macros in rules_ios
1 parent d6f4aa1 commit 4721cd0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

rules/framework.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def apple_framework(
7373
If '//conditions:default' is not set the value in 'xcconfig'
7474
is set as default.
7575
**kwargs: Arguments passed to the apple_library and apple_framework_packaging rules as appropriate.
76+
Note: plugins parameter for Swift macros should be passed through kwargs.
7677
"""
7778
framework_packaging_kwargs = {arg: kwargs.pop(arg) for arg in _APPLE_FRAMEWORK_PACKAGING_KWARGS if arg in kwargs}
7879
kwargs["enable_framework_vfs"] = kwargs.pop("enable_framework_vfs", True)

rules/library.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
load("@bazel_skylib//lib:dicts.bzl", "dicts")
44
load("@bazel_skylib//lib:paths.bzl", "paths")
5-
load("@bazel_skylib//lib:sets.bzl", "sets")
65
load("@bazel_skylib//lib:selects.bzl", "selects")
6+
load("@bazel_skylib//lib:sets.bzl", "sets")
77
load("@bazel_skylib//rules:write_file.bzl", "write_file")
88
load("@build_bazel_rules_apple//apple/internal:apple_framework_import.bzl", "apple_dynamic_framework_import", "apple_static_framework_import")
99
load("@build_bazel_rules_apple//apple/internal/resource_rules:apple_intent_library.bzl", "apple_intent_library")
1010
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_interop_hint", "swift_library")
11-
load("//rules:precompiled_apple_resource_bundle.bzl", "precompiled_apple_resource_bundle")
12-
load("//rules:hmap.bzl", "headermap")
1311
load("//rules:features.bzl", "feature_names")
12+
load("//rules:hmap.bzl", "headermap")
13+
load("//rules:import_middleman.bzl", "import_middleman")
14+
load("//rules:precompiled_apple_resource_bundle.bzl", "precompiled_apple_resource_bundle")
15+
load("//rules:utils.bzl", "bundle_identifier_for_bundle")
1416
load("//rules/framework:vfs_overlay.bzl", "framework_vfs_overlay", VFS_OVERLAY_FRAMEWORK_SEARCH_PATH = "FRAMEWORK_SEARCH_PATH")
1517
load("//rules/library:resources.bzl", "wrap_resources_in_filegroup")
1618
load("//rules/library:xcconfig.bzl", "copts_by_build_setting_with_defaults")
17-
load("//rules:import_middleman.bzl", "import_middleman")
18-
load("//rules:utils.bzl", "bundle_identifier_for_bundle")
1919

2020
PrivateHeadersInfo = provider(
2121
doc = "Propagates private headers, so they can be accessed if necessary",
@@ -499,7 +499,7 @@ def apple_library(
499499
the respective bazel build setting is resolved during the analysis phase.
500500
objc_defines: A list of Objective-C defines to add to the compilation command line. They should be in the form KEY=VALUE or simply KEY and are passed not only to the compiler for this target (as copts are) but also to all objc_ dependers of this target.
501501
swift_defines: A list of Swift defines to add to the compilation command line. Swift defines do not have values, so strings in this list should be simple identifiers and not KEY=VALUE pairs. (only expections are KEY=1 and KEY=0). These flags are added for the target and every target that depends on it.
502-
**kwargs: keyword arguments.
502+
**kwargs: keyword arguments. Note: plugins parameter for Swift macros should be passed through kwargs.
503503
504504
Returns:
505505
Struct with a bunch of info

0 commit comments

Comments
 (0)