@@ -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 ,
@@ -625,7 +628,6 @@ def _ios_app_clip_impl(ctx):
625628 entitlements = entitlements_support .process_entitlements (
626629 actions = actions ,
627630 apple_mac_toolchain_info = apple_mac_toolchain_info ,
628- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
629631 bundle_id = bundle_id ,
630632 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
631633 cc_toolchains = cc_toolchain_forwarder ,
@@ -1208,7 +1210,6 @@ def _ios_extension_impl(ctx):
12081210 entitlements = entitlements_support .process_entitlements (
12091211 actions = actions ,
12101212 apple_mac_toolchain_info = apple_mac_toolchain_info ,
1211- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
12121213 bundle_id = bundle_id ,
12131214 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
12141215 cc_toolchains = cc_toolchain_forwarder ,
@@ -1752,6 +1753,7 @@ def _ios_static_framework_impl(ctx):
17521753 apple_mac_toolchain_info = ctx .attr ._mac_toolchain [AppleMacToolsToolchainInfo ]
17531754 apple_xplat_toolchain_info = ctx .attr ._xplat_toolchain [AppleXPlatToolsToolchainInfo ]
17541755 avoid_deps = ctx .attr .avoid_deps
1756+ cc_configured_features_init = features_support .make_cc_configured_features_init (ctx )
17551757 cc_toolchain_forwarder = ctx .split_attr ._cc_toolchain_forwarder
17561758 deps = ctx .attr .deps
17571759 label = ctx .label
@@ -1782,6 +1784,15 @@ def _ios_static_framework_impl(ctx):
17821784 xcode_version_config = ctx .attr ._xcode_config [apple_common .XcodeVersionConfig ],
17831785 )
17841786 resource_deps = ctx .attr .deps + ctx .attr .resources
1787+ secure_features = ctx .attr .secure_features
1788+
1789+ # Check that the requested secure features are supported and enabled for the toolchain.
1790+ secure_features_support .validate_secure_features_support (
1791+ cc_configured_features_init = cc_configured_features_init ,
1792+ cc_toolchain_forwarder = cc_toolchain_forwarder ,
1793+ rule_label = label ,
1794+ secure_features = secure_features ,
1795+ )
17851796
17861797 archive_result = linking_support .register_static_library_archive_action (
17871798 ctx = ctx ,
@@ -1965,7 +1976,6 @@ app an implementation.
19651976 entitlements = entitlements_support .process_entitlements (
19661977 actions = actions ,
19671978 apple_mac_toolchain_info = apple_mac_toolchain_info ,
1968- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
19691979 bundle_id = bundle_id ,
19701980 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
19711981 cc_toolchains = cc_toolchain_forwarder ,
@@ -2177,7 +2187,6 @@ def _ios_imessage_extension_impl(ctx):
21772187 entitlements = entitlements_support .process_entitlements (
21782188 actions = actions ,
21792189 apple_mac_toolchain_info = apple_mac_toolchain_info ,
2180- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
21812190 bundle_id = bundle_id ,
21822191 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
21832192 cc_toolchains = cc_toolchain_forwarder ,
@@ -2454,7 +2463,6 @@ def _ios_sticker_pack_extension_impl(ctx):
24542463 entitlements = entitlements_support .process_entitlements (
24552464 actions = actions ,
24562465 apple_mac_toolchain_info = apple_mac_toolchain_info ,
2457- apple_xplat_toolchain_info = apple_xplat_toolchain_info ,
24582466 bundle_id = bundle_id ,
24592467 cc_configured_features_init = features_support .make_cc_configured_features_init (ctx ),
24602468 cc_toolchains = cc_toolchain_forwarder ,
@@ -3075,6 +3083,12 @@ fashion, such as a Cocoapod.
30753083A list of `.h` files that will be publicly exposed by this framework. These headers should have
30763084framework-relative imports, and if non-empty, an umbrella header named `%{bundle_name}.h` will also
30773085be generated that imports all of the headers listed here.
3086+ """ ,
3087+ ),
3088+ "secure_features" : attr .string_list (
3089+ doc = """
3090+ A list of strings representing Apple Enhanced Security crosstool features that should be enabled for
3091+ this target.
30783092""" ,
30793093 ),
30803094 "umbrella_header" : attr .label (
0 commit comments