@@ -240,6 +240,7 @@ def _ios_application_impl(ctx):
240240
241241 link_result = linking_support .register_binary_linking_action (
242242 ctx ,
243+ cc_toolchains = cc_toolchain_forwarder ,
243244 avoid_deps = ctx .attr .frameworks ,
244245 entitlements = entitlements .linking ,
245246 exported_symbols_lists = ctx .files .exported_symbols_lists ,
@@ -557,6 +558,7 @@ def _ios_app_clip_impl(ctx):
557558 suffix_default = ctx .attr ._bundle_id_suffix_default ,
558559 shared_capabilities = ctx .attr .shared_capabilities ,
559560 )
561+ cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
560562 bundle_verification_targets = [struct (target = ext ) for ext in ctx .attr .extensions ]
561563 embeddable_targets = (
562564 ctx .attr .frameworks +
@@ -613,6 +615,7 @@ def _ios_app_clip_impl(ctx):
613615
614616 link_result = linking_support .register_binary_linking_action (
615617 ctx ,
618+ cc_toolchains = cc_toolchain_forwarder ,
616619 avoid_deps = ctx .attr .frameworks ,
617620 entitlements = entitlements .linking ,
618621 exported_symbols_lists = ctx .files .exported_symbols_lists ,
@@ -877,6 +880,7 @@ def _ios_framework_impl(ctx):
877880 suffix_default = ctx .attr ._bundle_id_suffix_default ,
878881 )
879882 cc_toolchain = find_cpp_toolchain (ctx )
883+ cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
880884 cc_features = cc_common .configure_features (
881885 ctx = ctx ,
882886 cc_toolchain = cc_toolchain ,
@@ -935,6 +939,7 @@ def _ios_framework_impl(ctx):
935939
936940 link_result = linking_support .register_binary_linking_action (
937941 ctx ,
942+ cc_toolchains = cc_toolchain_forwarder ,
938943 avoid_deps = ctx .attr .frameworks ,
939944 # Frameworks do not have entitlements.
940945 entitlements = None ,
@@ -1149,6 +1154,7 @@ def _ios_extension_impl(ctx):
11491154 suffix_default = ctx .attr ._bundle_id_suffix_default ,
11501155 shared_capabilities = ctx .attr .shared_capabilities ,
11511156 )
1157+ cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
11521158 features = features_support .compute_enabled_features (
11531159 requested_features = ctx .features ,
11541160 unsupported_features = ctx .disabled_features ,
@@ -1210,6 +1216,7 @@ def _ios_extension_impl(ctx):
12101216
12111217 link_result = linking_support .register_binary_linking_action (
12121218 ctx ,
1219+ cc_toolchains = cc_toolchain_forwarder ,
12131220 avoid_deps = ctx .attr .frameworks ,
12141221 entitlements = entitlements .linking ,
12151222 exported_symbols_lists = ctx .files .exported_symbols_lists ,
@@ -1461,6 +1468,7 @@ def _ios_dynamic_framework_impl(ctx):
14611468 )
14621469 executable_name = ctx .attr .executable_name
14631470 cc_toolchain = find_cpp_toolchain (ctx )
1471+ cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
14641472 cc_features = cc_common .configure_features (
14651473 ctx = ctx ,
14661474 cc_toolchain = cc_toolchain ,
@@ -1525,6 +1533,7 @@ def _ios_dynamic_framework_impl(ctx):
15251533
15261534 link_result = linking_support .register_binary_linking_action (
15271535 ctx ,
1536+ cc_toolchains = cc_toolchain_forwarder ,
15281537 avoid_deps = ctx .attr .frameworks ,
15291538 # Frameworks do not have entitlements.
15301539 entitlements = None ,
@@ -1774,8 +1783,11 @@ def _ios_static_framework_impl(ctx):
17741783 )
17751784 resource_deps = ctx .attr .deps + ctx .attr .resources
17761785
1777- link_result = linking_support .register_static_library_linking_action (ctx = ctx )
1778- binary_artifact = link_result .library
1786+ archive_result = linking_support .register_static_library_archive_action (
1787+ ctx = ctx ,
1788+ cc_toolchains = cc_toolchain_forwarder ,
1789+ )
1790+ binary_artifact = archive_result .library
17791791
17801792 processor_partials = [
17811793 partials .apple_bundle_info_partial (
@@ -2101,6 +2113,7 @@ def _ios_imessage_extension_impl(ctx):
21012113 shared_capabilities = ctx .attr .shared_capabilities ,
21022114 )
21032115 executable_name = ctx .attr .executable_name
2116+ cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
21042117 features = features_support .compute_enabled_features (
21052118 requested_features = ctx .features ,
21062119 unsupported_features = ctx .disabled_features ,
@@ -2156,6 +2169,7 @@ def _ios_imessage_extension_impl(ctx):
21562169
21572170 link_result = linking_support .register_binary_linking_action (
21582171 ctx ,
2172+ cc_toolchains = cc_toolchain_forwarder ,
21592173 avoid_deps = ctx .attr .frameworks ,
21602174 entitlements = entitlements .linking ,
21612175 exported_symbols_lists = ctx .files .exported_symbols_lists ,
@@ -2565,9 +2579,6 @@ ios_application = rule_factory.create_apple_rule(
25652579 is_test_supporting_rule = False ,
25662580 requires_legacy_cc_toolchain = True ,
25672581 ),
2568- rule_attrs .cc_toolchain_forwarder_attrs (
2569- deps_cfg = transition_support .apple_platform_split_transition ,
2570- ),
25712582 rule_attrs .common_bundle_attrs (deps_cfg = transition_support .apple_platform_split_transition ),
25722583 rule_attrs .common_tool_attrs (),
25732584 rule_attrs .device_family_attrs (
@@ -2756,9 +2767,6 @@ However, iOS 14 introduced Widget Extensions that use a traditional `main` entry
27562767 is_test_supporting_rule = False ,
27572768 requires_legacy_cc_toolchain = True ,
27582769 ),
2759- rule_attrs .cc_toolchain_forwarder_attrs (
2760- deps_cfg = transition_support .apple_platform_split_transition ,
2761- ),
27622770 rule_attrs .common_bundle_attrs (
27632771 deps_cfg = transition_support .apple_platform_split_transition ,
27642772 ),
@@ -2989,9 +2997,6 @@ i.e. `--features=-swift.no_generated_header`).""",
29892997 is_test_supporting_rule = False ,
29902998 requires_legacy_cc_toolchain = True ,
29912999 ),
2992- rule_attrs .cc_toolchain_forwarder_attrs (
2993- deps_cfg = _STATIC_FRAMEWORK_DEPS_CFG ,
2994- ),
29953000 rule_attrs .common_bundle_attrs (
29963001 deps_cfg = _STATIC_FRAMEWORK_DEPS_CFG ,
29973002 ),
0 commit comments