Upgrade various other dependencies

It has been a bit, hit them all.

Change-Id: Ie29dafb467d8bd070d595df0ea3ea6cbbbbafe55
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/WORKSPACE b/WORKSPACE
index 1ccc5cb..8458b04 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -20,10 +20,10 @@
 
 http_archive(
     name = "bazel_skylib",
-    sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
+    sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
     urls = [
-        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
-        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
+        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
+        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
     ],
 )
 
@@ -103,10 +103,9 @@
 
 http_archive(
     name = "rules_pkg",
-    sha256 = "8c20f74bca25d2d442b327ae26768c02cf3c99e93fad0381f32be9aab1967675",
+    sha256 = "cad05f864a32799f6f9022891de91ac78f30e0fa07dc68abac92a628121b5b11",
     urls = [
-        "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz",
-        "https://github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz",
+        "https://github.com/bazelbuild/rules_pkg/releases/download/1.0.0/rules_pkg-1.0.0.tar.gz",
     ],
 )
 
@@ -678,19 +677,18 @@
     name = "com_google_googletest",
     patch_args = ["-p1"],
     patches = ["//third_party/googletest:googletest.patch"],
-    sha256 = "5c6d595243de011f8ce8cc68050cc0490726786e80cdfd6555ebfe148d920407",
-    strip_prefix = "googletest-356fc301251378e0f6fa6aa794d73714202887ac",
-    urls = ["https://github.com/google/googletest/archive/356fc301251378e0f6fa6aa794d73714202887ac.zip"],
+    sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
+    strip_prefix = "googletest-1.14.0",
+    urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
 )
 
-# External dependency: Google Benchmark; has no Bazel build.
 http_archive(
     name = "com_github_google_benchmark",
     patch_args = ["-p1"],
     patches = ["//third_party/google-benchmark:benchmark.patch"],
-    sha256 = "6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7",
-    strip_prefix = "benchmark-1.7.1",
-    urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.7.1.tar.gz"],
+    sha256 = "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45",
+    strip_prefix = "benchmark-1.8.4",
+    urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz"],
 )
 
 http_archive(
diff --git a/third_party/google-benchmark/benchmark.patch b/third_party/google-benchmark/benchmark.patch
index 4d4a6ff..1dda7a0 100644
--- a/third_party/google-benchmark/benchmark.patch
+++ b/third_party/google-benchmark/benchmark.patch
@@ -1,69 +1,22 @@
 diff --git a/BUILD.bazel b/BUILD.bazel
-index 64f86ee..a588046 100644
+index 15d8369..768e9f3 100644
 --- a/BUILD.bazel
 +++ b/BUILD.bazel
-@@ -39,22 +39,25 @@ cc_library(
-         "include/benchmark/benchmark.h",
-         "include/benchmark/export.h",
-     ],
-+    copts = [
-+        "-Wno-format-nonliteral",
-+    ],
-+    defines = [
-+        "BENCHMARK_STATIC_DEFINE",
-+    ] + select({
-+        ":perfcounters": ["HAVE_LIBPFM"],
-+        "//conditions:default": [],
-+    }),
-     linkopts = select({
-         ":windows": ["-DEFAULTLIB:shlwapi.lib"],
-         "//conditions:default": ["-pthread"],
-     }),
--    strip_include_prefix = "include",
--    visibility = ["//visibility:public"],
-     # Only static linking is allowed; no .so will be produced.
-     # Using `defines` (i.e. not `local_defines`) means that no
-     # dependent rules need to bother about defining the macro.
-     linkstatic = True,
--    defines = [
--        "BENCHMARK_STATIC_DEFINE",
--    ] + select({
--        ":perfcounters": ["HAVE_LIBPFM"],
--        "//conditions:default": [],
--    }),
-+    strip_include_prefix = "include",
-+    visibility = ["//visibility:public"],
-     deps = select({
-         ":perfcounters": ["@libpfm//:libpfm"],
-         "//conditions:default": [],
-@@ -64,7 +67,10 @@ cc_library(
- cc_library(
-     name = "benchmark_main",
-     srcs = ["src/benchmark_main.cc"],
--    hdrs = ["include/benchmark/benchmark.h", "include/benchmark/export.h"],
-+    hdrs = [
-+        "include/benchmark/benchmark.h",
-+        "include/benchmark/export.h",
-+    ],
-     strip_include_prefix = "include",
-     visibility = ["//visibility:public"],
-     deps = [":benchmark"],
-diff --git a/bindings/python/BUILD b/bindings/python/BUILD
-deleted file mode 100644
-index 9559a76..0000000
---- a/bindings/python/BUILD
-+++ /dev/null
-@@ -1,3 +0,0 @@
--exports_files(glob(["*.BUILD"]))
--exports_files(["build_defs.bzl"])
--
+@@ -15,6 +15,7 @@ COPTS = [
+     ## unused-variable warning.
+     "-Wno-unused-variable",
+     "-Werror=old-style-cast",
++    "-Wno-format-nonliteral",
+ ]
+ 
+ config_setting(
 diff --git a/bindings/python/google_benchmark/BUILD b/bindings/python/google_benchmark/BUILD
 deleted file mode 100644
-index 3c1561f..0000000
+index 0c8e3c1..0000000
 --- a/bindings/python/google_benchmark/BUILD
 +++ /dev/null
-@@ -1,38 +0,0 @@
--load("//bindings/python:build_defs.bzl", "py_extension")
+@@ -1,27 +0,0 @@
+-load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension")
 -
 -py_library(
 -    name = "google_benchmark",
@@ -71,23 +24,13 @@
 -    visibility = ["//visibility:public"],
 -    deps = [
 -        ":_benchmark",
--        # pip; absl:app
 -    ],
 -)
 -
--py_extension(
+-nanobind_extension(
 -    name = "_benchmark",
 -    srcs = ["benchmark.cc"],
--    copts = [
--        "-fexceptions",
--        "-fno-strict-aliasing",
--    ],
--    features = ["-use_header_modules"],
--    deps = [
--        "//:benchmark",
--        "@pybind11",
--        "@python_headers",
--    ],
+-    deps = ["//:benchmark"],
 -)
 -
 -py_test(
@@ -100,99 +43,42 @@
 -        ":google_benchmark",
 -    ],
 -)
--
 diff --git a/test/BUILD b/test/BUILD
-index 0a66bf3..4d62699 100644
+index b245fa7..86f5d29 100644
 --- a/test/BUILD
 +++ b/test/BUILD
-@@ -18,6 +18,10 @@ TEST_COPTS = [
-     #    "-Wshorten-64-to-32",
-     "-Wfloat-equal",
-     "-fstrict-aliasing",
+@@ -22,6 +22,9 @@ TEST_COPTS = [
+     ## unused-variable warning.
+     "-Wno-unused-variable",
+     "-Werror=old-style-cast",
 +    "-Wno-unused-but-set-variable",
-+    "-Wno-unused-variable",
 +    "-Wno-unused-function",
 +    "-Wno-unused-parameter",
  ]
  
  # Some of the issues with DoNotOptimize only occur when optimization is enabled
-@@ -27,12 +31,12 @@ PER_SRC_COPTS = {
- 
- TEST_ARGS = ["--benchmark_min_time=0.01"]
- 
--PER_SRC_TEST_ARGS = ({
-+PER_SRC_TEST_ARGS = {
-     "user_counters_tabular_test.cc": ["--benchmark_counters_tabular=true"],
-     "repetitions_test.cc": [" --benchmark_repetitions=3"],
--    "spec_arg_test.cc" : ["--benchmark_filter=BM_NotChosen"],
--    "spec_arg_verbosity_test.cc" : ["--v=42"],
--})
-+    "spec_arg_test.cc": ["--benchmark_filter=BM_NotChosen"],
-+    "spec_arg_verbosity_test.cc": ["--v=42"],
-+}
- 
- cc_library(
-     name = "output_test_helper",
-@@ -58,14 +62,14 @@ cc_library(
-         copts = select({
-             "//:windows": [],
-             "//conditions:default": TEST_COPTS,
--        }) + PER_SRC_COPTS.get(test_src, []) ,
-+        }) + PER_SRC_COPTS.get(test_src, []),
-         deps = [
-             ":output_test_helper",
-             "//:benchmark",
-             "//:benchmark_internal_headers",
-             "@com_google_googletest//:gtest",
-             "@com_google_googletest//:gtest_main",
--        ]
-+        ],
-         # FIXME: Add support for assembly tests to bazel.
-         # See Issue #556
-         # https://github.com/google/benchmark/issues/556
-@@ -85,6 +89,10 @@ cc_test(
-     size = "small",
-     srcs = ["cxx03_test.cc"],
-     copts = TEST_COPTS + ["-std=c++03"],
-+    target_compatible_with = select({
-+        "//:windows": ["@platforms//:incompatible"],
-+        "//conditions:default": [],
-+    }),
-     deps = [
-         ":output_test_helper",
-         "//:benchmark",
-@@ -92,10 +100,6 @@ cc_test(
-         "@com_google_googletest//:gtest",
-         "@com_google_googletest//:gtest_main",
-     ],
--    target_compatible_with = select({
--        "//:windows": ["@platforms//:incompatible"],
--        "//conditions:default": [],
--    })
- )
- 
- cc_test(
 diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel
 deleted file mode 100644
-index 5895883..0000000
+index 8ef6a86..0000000
 --- a/tools/BUILD.bazel
 +++ /dev/null
-@@ -1,19 +0,0 @@
--load("@py_deps//:requirements.bzl", "requirement")
+@@ -1,20 +0,0 @@
+-load("@tools_pip_deps//:requirements.bzl", "requirement")
 -
 -py_library(
 -    name = "gbench",
 -    srcs = glob(["gbench/*.py"]),
 -    deps = [
--      requirement("numpy"),
--      requirement("scipy"),
+-        requirement("numpy"),
+-        requirement("scipy"),
 -    ],
 -)
 -
 -py_binary(
 -    name = "compare",
 -    srcs = ["compare.py"],
--    python_version = "PY2",
+-    imports = ["."],
+-    python_version = "PY3",
 -    deps = [
 -        ":gbench",
 -    ],