Skip to content

Commit 5eb616d

Browse files
committed
Automated Code Change
PiperOrigin-RevId: 803375108
1 parent 70033cb commit 5eb616d

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
lines changed

struct2tensor/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# Prensors provide a way to parse protocol buffers and other structured data in tensorflow
1616
# simply and efficiently.
1717

18+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1819
# Placeholder: load py_test
1920

2021
load("//struct2tensor:struct2tensor.bzl", "s2t_pytype_library")

struct2tensor/benchmarks/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
16+
1517
# Placeholder: load py_proto_library
1618
# Placeholder: load py_binary
1719
# Placeholder: load py_library

struct2tensor/kernels/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# CPU kernels for struct2tensors.
1616

17+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1718
load("//struct2tensor:struct2tensor.bzl", "s2t_dynamic_library")
1819

1920
package(

struct2tensor/kernels/parquet/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515
# Parquet Dataset Kernel Implementation.
1616

17+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
18+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
1719
load("//struct2tensor:struct2tensor.bzl", "s2t_dynamic_library")
1820

1921
package(

struct2tensor/ops/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
3+
14
# Placeholder: load py_test
25
load("//struct2tensor:struct2tensor.bzl", "s2t_dynamic_binary", "s2t_dynamic_library", "s2t_gen_op_wrapper_py", "s2t_pytype_library")
36

struct2tensor/struct2tensor.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"""Bazel macros used in OSS."""
1616

1717
load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library", "py_proto_library")
18+
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
19+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1820

1921
def s2t_pytype_library(
2022
name,
@@ -74,7 +76,7 @@ DYNAMIC_DEPS = ["@local_config_tf//:libtensorflow_framework", "@local_config_tf/
7476

7577
def s2t_dynamic_binary(name, deps):
7678
"""Creates a .so file intended for linking with tensorflow_framework.so."""
77-
native.cc_binary(
79+
cc_binary(
7880
name = name,
7981
copts = DYNAMIC_COPTS,
8082
linkshared = 1,
@@ -87,7 +89,7 @@ def s2t_dynamic_library(
8789
deps = None):
8890
"""Creates a static library intended for linking with tensorflow_framework.so."""
8991
true_deps = [] if deps == None else deps
90-
native.cc_library(
92+
cc_library(
9193
name = name,
9294
srcs = srcs,
9395
alwayslink = 1,

struct2tensor/workspace.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2121
def struct2tensor_workspace():
2222
"""All struct2tensor external dependencies."""
2323

24+
http_archive(
25+
name = "rules_cc",
26+
sha256 = "b8b918a85f9144c01f6cfe0f45e4f2838c7413961a8ff23bc0c6cdf8bb07a3b6",
27+
strip_prefix = "rules_cc-0.1.5",
28+
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.1.5/rules_cc-0.1.5.tar.gz",
29+
)
30+
2431
# ===== Bazel package rules dependency =====
2532
http_archive(
2633
name = "rules_pkg",

0 commit comments

Comments
 (0)