Skip to content

Commit 3882951

Browse files
authored
Drop bazel 6.x support (#2610)
With 8.x out imminently, the number of permutations to support bazel changes and legacy linking behavior in bazel 6.x is getting too costly.
1 parent b5dc9d1 commit 3882951

File tree

5 files changed

+2
-36
lines changed

5 files changed

+2
-36
lines changed

.bazelci/presubmit.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ x_defaults:
1414
- "examples/..."
1515
test_flags:
1616
- --test_tag_filters=-skipci
17-
bazel_6: &bazel_6
18-
test_flags:
19-
- --test_tag_filters=-skipci,-skip_bazel6_ci
2017

2118
# NOTE: To avoid listing the same things for build_flags/test_flags for each
2219
# of these tasks, they are listed in the .bazelrc instead.
@@ -26,12 +23,6 @@ tasks:
2623
bazel: latest
2724
<<: *common
2825

29-
macos_6_lts:
30-
name: "6.x LTS"
31-
bazel: 6.x
32-
<<: *common
33-
<<: *bazel_6
34-
3526
macos_last_green:
3627
name: "Last Green Bazel"
3728
# FIXME: Use last_green once we cherry-pick in changes needed by

.bazelrc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ build --nocheck_visibility
2121
# dependencies cause us to use a newer version
2222
build --check_direct_dependencies=off
2323

24-
# This is needed for Bazel 6 compatibility.
25-
# It's enabled (and can't be disabled) in Bazel 7.
26-
# TODO: Remove this once we drop Bazel 6 support.
27-
# See also: https://github.com/bazelbuild/bazel/issues/14327
28-
build --experimental_enable_aspect_hints
29-
3024
# Disable the worker, which has sandboxing disabled by default, which can hide
3125
# issues with non-hermetic bugs.
3226
build --spawn_strategy=sandboxed,local

apple/internal/aspects/resource_aspect.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ def _apple_resource_aspect_impl(target, ctx):
133133
hint_action = None
134134
default_action = None
135135

136-
# TODO: remove usage of `getattr` and use `aspect_ctx.rule.attr.aspect_hints` directly when we drop Bazel 6.
137136
aspect_hint = None
138-
for hint in getattr(ctx.rule.attr, "aspect_hints", []):
137+
for hint in ctx.rule.attr.aspect_hints:
139138
if AppleResourceHintInfo in hint:
140139
if aspect_hint:
141140
fail(("Conflicting AppleResourceHintInfo from aspect hints " +

apple/internal/rule_attrs.bzl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,6 @@ def _common_linking_api_attrs(*, deps_cfg):
148148
),
149149
})
150150

151-
def _j2objc_binary_linking_attrs():
152-
"""Returns a dictionary of required attributes for J2ObjC processing code in native linking.
153-
"""
154-
return {
155-
# xcrunwrapper is no longer used by rules_apple, but the underlying implementation of
156-
# apple_common.link_multi_arch_binary and j2objc_dead_code_pruner require this attribute.
157-
# See CompilationSupport.java:
158-
# - `registerJ2ObjcDeadCodeRemovalActions()`
159-
# - `registerLinkActions()` --> `registerBinaryStripAction()`
160-
# TODO(b/117932394): Remove this once Bazel 6 support is dropped.
161-
"_xcrunwrapper": attr.label(
162-
cfg = "exec",
163-
executable = True,
164-
default = Label("@bazel_tools//tools/objc:xcrunwrapper"),
165-
),
166-
}
167-
168151
def _static_library_linking_attrs(*, deps_cfg):
169152
"""Returns dictionary of required attributes for apple_common.link_multi_arch_static_library.
170153
@@ -218,7 +201,6 @@ def _binary_linking_attrs(
218201
return dicts.add(
219202
extra_attrs,
220203
_common_linking_api_attrs(deps_cfg = deps_cfg),
221-
_j2objc_binary_linking_attrs(),
222204
{
223205
"codesign_inputs": attr.label_list(
224206
doc = """

test/starlark_tests/apple_dynamic_xcframework_import_tests.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def apple_dynamic_xcframework_import_test_suite(name):
134134
macho_load_commands_contain = [
135135
"name @rpath/generated_dynamic_xcframework_with_headers.framework/generated_dynamic_xcframework_with_headers (offset 24)",
136136
],
137-
tags = [name, "skip_bazel6_ci"],
137+
tags = [name],
138138
)
139139

140140
# Verify the correct XCFramework library was bundled and sliced for the required architecture.

0 commit comments

Comments
 (0)