Skip to content

Commit

Permalink
Fixes for Bazel 6 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum authored Nov 27, 2024
1 parent 8670937 commit b2bdd9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_license", version = "0.0.7")

download_jdk_deps = use_extension(
Expand Down
10 changes: 2 additions & 8 deletions tests/analysis/cc_jni_library/tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,16 @@ def _get_host_legacy_cpu():
cpu = _get_host_constraint_value("cpu")
os = _get_host_constraint_value("os")

# Indirectly test for Bazel 7 via:
# https://github.com/bazelbuild/bazel/commit/31fd464af77f084049386af02dbcc5189c745892
is_bazel_7_or_higher = attr.string() == attr.string()
if os == "osx" and cpu == "aarch64":
return "darwin_arm64"
if cpu != "x86_64":
fail("This test requires the host CPU to be x86_64 or darwin_arm64, got: %s" % cpu)
if os == "linux":
return "k8"
elif os == "osx":
if is_bazel_7_or_higher:
return "darwin_x86_64"
else:
return "darwin"
elif os == "windows":
return "x64_windows"
elif os == "osx":
return "darwin_x86_64"
else:
fail("This test requires the host OS to be linux, macos or windows, got: %s" % os)

Expand Down

0 comments on commit b2bdd9e

Please sign in to comment.