Fix memory regression objc_library
The regression was introduced by which made create_linking_context_from_compilation_outputs() create empty archives for libraries without sources.
That behavior is needed for cc_library but we can simply not call the method when there are no sources in objc_libraries.
RELNOTES:none
@@ -482,6 +482,7 @@ def _cc_compile_and_link(
if hasattr(common_variables.ctx.attr, "deps"):
linking_contexts = cc_helper.get_linking_contexts_from_deps(common_variables.ctx.attr.deps)
+ if len(compilation_outputs.objects) != 0 or len(compilation_outputs.pic_objects) != 0:
cc_common.create_linking_context_from_compilation_outputs(
actions = ctx.actions,
feature_configuration = feature_configuration,
