Skip to content

Commit

Permalink
Support Bazel 8.0.0rc4 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyawk authored Nov 26, 2024
1 parent 98a7f23 commit 3c0070f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
bazel-version:
- 6.x
- 7.x
- 8.0.0rc4
runner:
- ubuntu-20.04
- ubuntu-22.04
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
bazel-version:
- 6.x
- 7.x
- 8.0.0rc4
runner:
- ubuntu-20.04
- ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module(
version = "0.0.0",
)

bazel_dep(name = "platforms", version = "0.0.10")

################################
#
# Dev-dependencies
Expand Down
9 changes: 4 additions & 5 deletions lang/cc/build_error.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ load(
)
load(
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
"CPP_TOOLCHAIN_TYPE",
"find_cpp_toolchain",
)
load(
Expand Down Expand Up @@ -449,7 +448,7 @@ _try_build = rule(
),
},
fragments = ["cpp"],
toolchains = [CPP_TOOLCHAIN_TYPE],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
provides = [CcBuildErrorInfo, DefaultInfo],
)

Expand Down Expand Up @@ -603,9 +602,9 @@ def cc_build_error(
name = try_build_target,
tags = ["manual"] + tags,
os = select({
"@platforms//os:linux": "linux",
"@platforms//os:macos": "macos",
"@platforms//os:windows": "windows",
Label("//platforms/os:linux"): "linux",
Label("//platforms/os:macos"): "macos",
Label("//platforms/os:windows"): "windows",
}),
visibility = ["//visibility:private"],
testonly = testonly,
Expand Down
Empty file added platforms/BUILD.bazel
Empty file.
14 changes: 14 additions & 0 deletions platforms/os/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
alias(
name = "linux",
actual = "@platforms//os:linux",
)

alias(
name = "macos",
actual = "@platforms//os:macos",
)

alias(
name = "windows",
actual = "@platforms//os:windows",
)

0 comments on commit 3c0070f

Please sign in to comment.