@@ -122,6 +122,10 @@ load(
122122 "//apple/internal:run_support.bzl" ,
123123 "run_support" ,
124124)
125+ load (
126+ "//apple/internal:secure_features_support.bzl" ,
127+ "secure_features_support" ,
128+ )
125129load (
126130 "//apple/internal:stub_support.bzl" ,
127131 "stub_support" ,
@@ -232,7 +236,6 @@ def _ios_application_impl(ctx):
232236 entitlements = entitlements_support .process_entitlements (
233237 actions = actions ,
234238 apple_mac_toolchain_info = apple_mac_toolchain_info ,
235- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
236239 bundle_id = bundle_id ,
237240 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
238241 cc_toolchains = cc_toolchain_forwarder ,
@@ -628,7 +631,6 @@ def _ios_app_clip_impl(ctx):
628631 entitlements = entitlements_support .process_entitlements (
629632 actions = actions ,
630633 apple_mac_toolchain_info = apple_mac_toolchain_info ,
631- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
632634 bundle_id = bundle_id ,
633635 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
634636 cc_toolchains = cc_toolchain_forwarder ,
@@ -1202,7 +1204,6 @@ def _ios_extension_impl(ctx):
12021204 entitlements = entitlements_support .process_entitlements (
12031205 actions = actions ,
12041206 apple_mac_toolchain_info = apple_mac_toolchain_info ,
1205- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
12061207 bundle_id = bundle_id ,
12071208 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
12081209 cc_toolchains = cc_toolchain_forwarder ,
@@ -1749,6 +1750,7 @@ def _ios_static_framework_impl(ctx):
17491750 apple_mac_toolchain_info = ctx .attr ._mac_toolchain [AppleMacToolsToolchainInfo ]
17501751 apple_xplat_toolchain_info = ctx .attr ._xplat_toolchain [AppleXPlatToolsToolchainInfo ]
17511752 avoid_deps = ctx .attr .avoid_deps
1753+ cc_configured_features_init = features_support .make_cc_configured_features_init (ctx )
17521754 cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
17531755 deps = ctx .attr .deps
17541756 label = ctx .label
@@ -1779,6 +1781,15 @@ def _ios_static_framework_impl(ctx):
17791781 xcode_version_config = ctx .attr ._xcode_config [apple_common .XcodeVersionConfig ],
17801782 )
17811783 resource_deps = ctx .attr .deps + ctx .attr .resources
1784+ secure_features = ctx .attr .secure_features
1785+
1786+ # Check that the requested secure features are supported and enabled for the toolchain.
1787+ secure_features_support .validate_secure_features_support (
1788+ cc_configured_features_init = cc_configured_features_init ,
1789+ cc_toolchain_forwarder = cc_toolchain_forwarder ,
1790+ rule_label = label ,
1791+ secure_features = secure_features ,
1792+ )
17821793
17831794 archive_result = linking_support .register_static_library_archive_action (
17841795 ctx = ctx ,
@@ -1962,7 +1973,6 @@ app an implementation.
19621973 entitlements = entitlements_support .process_entitlements (
19631974 actions = actions ,
19641975 apple_mac_toolchain_info = apple_mac_toolchain_info ,
1965- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
19661976 bundle_id = bundle_id ,
19671977 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
19681978 cc_toolchains = cc_toolchain_forwarder ,
@@ -2174,7 +2184,6 @@ def _ios_imessage_extension_impl(ctx):
21742184 entitlements = entitlements_support .process_entitlements (
21752185 actions = actions ,
21762186 apple_mac_toolchain_info = apple_mac_toolchain_info ,
2177- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
21782187 bundle_id = bundle_id ,
21792188 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
21802189 cc_toolchains = cc_toolchain_forwarder ,
@@ -2451,7 +2460,6 @@ def _ios_sticker_pack_extension_impl(ctx):
24512460 entitlements = entitlements_support .process_entitlements (
24522461 actions = actions ,
24532462 apple_mac_toolchain_info = apple_mac_toolchain_info ,
2454- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
24552463 bundle_id = bundle_id ,
24562464 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
24572465 cc_toolchains = cc_toolchain_forwarder ,
@@ -3072,6 +3080,12 @@ fashion, such as a Cocoapod.
30723080A list of `.h` files that will be publicly exposed by this framework. These headers should have
30733081framework-relative imports, and if non-empty, an umbrella header named `%{bundle_name}.h` will also
30743082be generated that imports all of the headers listed here.
3083+ """ ,
3084+ ),
3085+ "secure_features" : attr .string_list (
3086+ doc = """
3087+ A list of strings representing Apple Enhanced Security crosstool features that should be enabled for
3088+ this target.
30753089""" ,
30763090 ),
30773091 "umbrella_header" : attr .label (
0 commit comments