diff --git a/bazel/example/BUILD.bazel b/bazel/example/BUILD.bazel index 05ab0f3..505911e 100644 --- a/bazel/example/BUILD.bazel +++ b/bazel/example/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_test.bzl", "cc_test") + cc_test( name = "main", size = "small", diff --git a/bazel/glog.bzl b/bazel/glog.bzl index a311d0d..6cd953f 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -9,6 +9,9 @@ # # Known issue: the namespace parameter is not supported on Win32. +load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_cc//cc:cc_test.bzl", "cc_test") + def expand_template_impl(ctx): ctx.actions.expand_template( template = ctx.file.template, @@ -165,7 +168,7 @@ def glog_library(with_gflags = 1, **kwargs): ] ) - native.cc_library( + cc_library( name = "glog", visibility = ["//visibility:public"], srcs = [ @@ -246,7 +249,7 @@ def glog_library(with_gflags = 1, **kwargs): ] for test_name in test_list: - native.cc_test( + cc_test( name = test_name + "_test", visibility = ["//visibility:public"], srcs = [ @@ -266,7 +269,7 @@ def glog_library(with_gflags = 1, **kwargs): # Workaround https://github.com/bazelbuild/bazel/issues/6337 by declaring # the dependencies without strip_include_prefix. - native.cc_library( + cc_library( name = "strip_include_prefix_hack", hdrs = [ "src/glog/flags.h",