Skip to content

Commit c17a03d

Browse files
luispadronnglevin
andauthored
Changes required to support Bazel 9 (#2868)
- Update CI to re-enable last_green - Update bzlmod dependencies to minimum required for bzlmod - Replace `apple_common.compilation_support` usage in Bazel 9+ - Remove legacy codepath for Xcode < 16.0 that were blocking Bazel 9+ - Update fixture tests to properly load `objc_library` and other removed symbols in Bazel 9+ Closes #2863 --------- Co-authored-by: Nicholas Levin <nglevin@google.com>
1 parent 0385289 commit c17a03d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+775
-312
lines changed

.bazelci/presubmit.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,25 @@ x_defaults:
3232
# NOTE: To avoid listing the same things for build_flags/test_flags for each
3333
# of these tasks, they are listed in the .bazelrc instead.
3434
tasks:
35-
macos_7.x:
36-
name: "7.x"
37-
bazel: 7.x
38-
<<: *common
39-
4035
macos_8.x:
4136
name: "8.x"
4237
bazel: 8.x
4338
<<: *common
4439

45-
# TODO: Re-enable when we fix bazel 9.x
46-
# macos_last_rc:
47-
# name: "Last RC Bazel"
48-
# bazel: last_rc
49-
# <<: *common
50-
51-
macos_last_green:
52-
name: "Last Green Bazel"
53-
# TODO: Move back to last_green ASAP
54-
bazel: 5409637c4e2d5c010b7264172b1004a2afd46bfe
40+
macos_9.x:
41+
name: "9.x"
42+
bazel: 9.x
5543
<<: *common
5644

45+
# TODO: Enable ASAP when we remove usage of `//command_line_option:incompatible_enable_apple_toolchain_resolution`
46+
# macos_last_green:
47+
# name: "Last Green Bazel"
48+
# bazel: last_green
49+
# <<: *common
50+
5751
doc_tests:
5852
name: "Doc tests"
59-
# TODO: Move back to last_green once rules_cc is fixed
60-
bazel: 48555196ef92f54d0a331a01dac9db0a6aabc8b4
53+
bazel: 9.x # TODO: use last_green when we fix issues
6154
platform: ubuntu2004
6255
test_targets:
6356
- "doc/..."

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5409637c4e2d5c010b7264172b1004a2afd46bfe
1+
rolling

.bcr/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
matrix:
2-
bazel: ["7.x", "8.x"]
2+
bazel: ["8.x", "9.x"]
33

44
tasks:
55
verify_targets:

MODULE.bazel

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@ module(
77
compatibility_level = 1,
88
)
99

10-
bazel_dep(name = "apple_support", version = "1.21.1", repo_name = "build_bazel_apple_support")
11-
bazel_dep(name = "bazel_features", version = "1.30.0")
12-
bazel_dep(name = "bazel_skylib", version = "1.7.1")
13-
bazel_dep(name = "platforms", version = "0.0.11")
14-
bazel_dep(name = "rules_cc", version = "0.1.2")
10+
bazel_dep(name = "apple_support", version = "2.2.0", repo_name = "build_bazel_apple_support")
11+
bazel_dep(name = "bazel_features", version = "1.36.0")
12+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
13+
bazel_dep(name = "platforms", version = "1.0.0")
14+
bazel_dep(name = "rules_cc", version = "0.2.17")
1515
bazel_dep(
1616
name = "rules_swift",
17-
version = "2.4.0",
17+
version = "3.5.0",
1818
max_compatibility_level = 3,
1919
repo_name = "build_bazel_rules_swift",
2020
)
21-
22-
# Test with latest rules_swift without requiring users to use this version
23-
single_version_override(
24-
module_name = "rules_swift",
25-
version = "3.0.2",
26-
)
27-
28-
bazel_dep(name = "rules_python", version = "1.3.0")
29-
bazel_dep(name = "rules_shell", version = "0.3.0")
21+
bazel_dep(name = "rules_python", version = "1.7.0")
22+
bazel_dep(name = "rules_shell", version = "0.6.1")
3023

3124
bazel_dep(
3225
name = "stardoc",

apple/internal/BUILD

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,19 @@ bzl_library(
195195
],
196196
)
197197

198+
bzl_library(
199+
name = "compilation_support",
200+
srcs = ["compilation_support.bzl"],
201+
visibility = [
202+
"//apple:__subpackages__",
203+
],
204+
deps = [
205+
":platform_support",
206+
"@bazel_skylib//lib:paths",
207+
"@rules_cc//cc/common",
208+
],
209+
)
210+
198211
bzl_library(
199212
name = "entitlements_support",
200213
srcs = ["entitlements_support.bzl"],
@@ -329,12 +342,14 @@ bzl_library(
329342
],
330343
deps = [
331344
":apple_toolchains",
332-
":cc_toolchain_info_support",
345+
":compilation_support",
333346
":entitlements_support",
347+
":intermediates",
334348
":providers",
335349
":rule_support",
336350
"@bazel_skylib//lib:collections",
337351
"@build_bazel_apple_support//lib:lipo",
352+
"@rules_cc//cc/private/rules_impl:objc_common",
338353
],
339354
)
340355

0 commit comments

Comments
 (0)