Skip to content

Commit 2c2a6fb

Browse files
committed
fix: use hasattr instead of bazel_features for objc strip action check
The bazel_features field objc_fragment_has_builtin_objc_strip_action doesn't exist in released versions. Use hasattr on the fragment directly.
1 parent d96883d commit 2c2a6fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apple/internal/compilation_support.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _register_configuration_specific_link_actions(
276276
feature_configuration = _build_feature_configuration(common_variables)
277277

278278
# TODO: Remove when we drop Bazel 8
279-
if bazel_features.cc.objc_fragment_has_builtin_objc_strip_action:
279+
if hasattr(ctx.fragments.objc, "builtin_objc_strip_action"):
280280
unstripped = ctx.fragments.objc.builtin_objc_strip_action
281281
else:
282282
unstripped = False
@@ -377,8 +377,8 @@ def _register_configuration_specific_link_actions_with_cpp_variables(
377377
variables_extension = user_variable_extensions,
378378
)
379379

380-
# TODO: Remove bazel_features check when we drop Baze 8
381-
if bazel_features.cc.objc_fragment_has_builtin_objc_strip_action and \
380+
# TODO: Remove hasattr check when we drop Bazel 8
381+
if hasattr(ctx.fragments.objc, "builtin_objc_strip_action") and \
382382
fragment_support.is_objc_strip_action_enabled(
383383
cpp_fragment = ctx.fragments.cpp,
384384
) and \

0 commit comments

Comments
 (0)