Skip to content

Commit

Permalink
remove objc from import_middleman
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaradp committed Jan 10, 2025
1 parent 6a78dd0 commit 009ccba
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions rules/import_middleman.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ def _find_imports_impl(target, ctx):
dynamic_framework_file.append(dep[_FindImportsAspectInfo].dynamic_framework_file)
import_infos.update(dep[_FindImportsAspectInfo].import_infos)

if ctx.rule.kind == "objc_import":
imported_library_file.append(target[apple_common.Objc].imported_library)

elif AppleFrameworkImportInfo in target:
static_framework_file.append(target[apple_common.Objc].imported_library)
target_dynamic_framework_file = target[apple_common.Objc].dynamic_framework_file
target_dynamic_framework_file_list = target_dynamic_framework_file.to_list()
if len(target_dynamic_framework_file_list) > 0:
import_infos[target_dynamic_framework_file_list[0].path] = target[AppleFrameworkImportInfo]
Expand Down Expand Up @@ -195,11 +190,6 @@ def _file_collector_rule_impl(ctx):
"library",
]

objc_provider_fields = objc_provider_utils.merge_objc_providers_dict(
providers = [dep[apple_common.Objc] for dep in ctx.attr.deps],
merge_keys = merge_keys,
)

exisiting_imported_libraries = objc_provider_fields.get("imported_library", depset([]))
replaced_imported_libraries = _replace_inputs(ctx, exisiting_imported_libraries, input_imported_libraries, _update_lib).inputs
objc_provider_fields["imported_library"] = depset(_deduplicate_test_deps(test_linker_deps[1], replaced_imported_libraries))
Expand Down Expand Up @@ -261,10 +251,6 @@ def _file_collector_rule_impl(ctx):
],
)

objc = apple_common.new_objc_provider(
**objc_provider_fields
)

dep_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps if CcInfo in dep]
cc_info = cc_common.merge_cc_infos(cc_infos = dep_cc_infos)
if is_bazel_7:
Expand Down

0 comments on commit 009ccba

Please sign in to comment.