[llvm] [benchmark][NFC] Update cc_binary load (PR #169710)

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 10:48:29 PST 2025


https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/169710

cc_binary now needs to be loaded from the rules_cc repo

I don't think this file is actually used, but updating it to be more syntactically correct anyway.

>From 01c631c6c0d1215cbfd12e625e5026f73501d0e5 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Wed, 26 Nov 2025 10:41:12 -0800
Subject: [PATCH] [benchmark][NFC] Update cc_binary load

---
 third-party/benchmark/bindings/python/build_defs.bzl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/third-party/benchmark/bindings/python/build_defs.bzl b/third-party/benchmark/bindings/python/build_defs.bzl
index b0c1b0f5807e3..d520eda616393 100644
--- a/third-party/benchmark/bindings/python/build_defs.bzl
+++ b/third-party/benchmark/bindings/python/build_defs.bzl
@@ -2,6 +2,8 @@
 This file contains some build definitions for C++ extensions used in the Google Benchmark Python bindings.
 """
 
+load("//third_party/bazel_rules/rules_cc/cc:cc_binary.bzl", "cc_binary")
+
 _SHARED_LIB_SUFFIX = {
     "//conditions:default": ".so",
     "//:windows": ".dll",
@@ -10,7 +12,7 @@ _SHARED_LIB_SUFFIX = {
 def py_extension(name, srcs, hdrs = [], copts = [], features = [], deps = []):
     for shared_lib_suffix in _SHARED_LIB_SUFFIX.values():
         shared_lib_name = name + shared_lib_suffix
-        native.cc_binary(
+        cc_binary(
             name = shared_lib_name,
             linkshared = True,
             linkstatic = True,



More information about the llvm-commits mailing list