aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs/apple
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-03-26 16:05:38 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2017-03-27 11:37:10 +0000
commit9288fe48edcde4c584224791e66b5ea8b64016a5 (patch)
treead0c24670b0a02306ef5694f286cd7e2386fca5a /tools/build_defs/apple
parent507de14c75ae5eff6069887cf7d4f1b900885488 (diff)
Description redacted.
-- PiperOrigin-RevId: 151263526 MOS_MIGRATED_REVID=151263526
Diffstat (limited to 'tools/build_defs/apple')
-rw-r--r--tools/build_defs/apple/swift.bzl47
1 files changed, 0 insertions, 47 deletions
diff --git a/tools/build_defs/apple/swift.bzl b/tools/build_defs/apple/swift.bzl
index 41fb4d226d..12fdf6533b 100644
--- a/tools/build_defs/apple/swift.bzl
+++ b/tools/build_defs/apple/swift.bzl
@@ -328,40 +328,6 @@ def swiftc_args(ctx):
return args
-def _collect_resource_sets(ctx, module_name):
- """Collects resource sets from the target and its dependencies.
-
- Args:
- ctx: The Skylark context.
- module_name: The name of the Swift module associated with the resources
- (either the user-provided name, or the auto-generated one).
- Returns:
- A list of structs representing the transitive resources to propagate to the
- bundling rules.
- """
- resource_sets = []
-
- # Create a resource set from the resources attached directly to this target.
- if ctx.files.resources or ctx.files.structured_resources:
- resource_sets.append(struct(
- bundle_dir=None,
- infoplists=depset(),
- objc_bundle_imports=depset(),
- resources=depset(ctx.files.resources),
- structured_resources=depset(ctx.files.structured_resources),
- structured_resource_zips=depset(),
- swift_module=module_name,
- ))
-
- # Collect transitive resource sets from dependencies.
- for dep in ctx.attr.deps:
- apple_resource = getattr(dep, "AppleResource", None)
- if apple_resource:
- resource_sets.extend(apple_resource.resource_sets)
-
- return resource_sets
-
-
def _swift_library_impl(ctx):
"""Implementation for swift_library Skylark rule."""
@@ -484,17 +450,12 @@ def _swift_library_impl(ctx):
link_inputs=set([output_module]),
uses_swift=True,)
- apple_resource_provider = struct(
- resource_sets=_collect_resource_sets(ctx, module_name)
- )
-
return struct(
swift=struct(
transitive_libs=[output_lib] + dep_libs,
transitive_modules=[output_module] + dep_modules,
transitive_defines=swiftc_defines),
objc=objc_provider,
- AppleResource=apple_resource_provider,
files=set([output_lib, output_module, output_header]))
SWIFT_LIBRARY_ATTRS = {
@@ -503,14 +464,6 @@ SWIFT_LIBRARY_ATTRS = {
"module_name": attr.string(mandatory=False),
"defines": attr.string_list(mandatory=False, allow_empty=True),
"copts": attr.string_list(mandatory=False, allow_empty=True),
- "resources": attr.label_list(
- mandatory=False,
- allow_empty=True,
- allow_files=True),
- "structured_resources": attr.label_list(
- mandatory=False,
- allow_empty=True,
- allow_files=True),
"_xcrunwrapper": attr.label(
executable=True,
cfg="host",