Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Bazel 6 #123

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading