Skip to content

Commit 48a2f9d

Browse files
comiuscopybara-github
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 802286886
1 parent 6135dbe commit 48a2f9d

File tree

13 files changed

+34
-6
lines changed

13 files changed

+34
-6
lines changed

bazel/antlr4_cc.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Build rules to create C++ code from an Antlr4 grammar."""
22

3+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
34
load("@rules_java//java:defs.bzl", "java_binary")
45

56
def antlr4_cc_lexer(name, src, namespaces = None, imports = None, deps = None, lib_import = None):
@@ -48,7 +49,7 @@ def antlr4_cc_lexer(name, src, namespaces = None, imports = None, deps = None, l
4849
heuristic_label_expansion = 0,
4950
tools = ["antlr_tool"],
5051
)
51-
native.cc_library(
52+
cc_library(
5253
name = name,
5354
srcs = [f for f in out_files if f.endswith(".cpp")],
5455
hdrs = [f for f in out_files if f.endswith(".h")],
@@ -131,7 +132,7 @@ def antlr4_cc_parser(
131132
":antlr_tool",
132133
],
133134
)
134-
native.cc_library(
135+
cc_library(
135136
name = name,
136137
srcs = [f for f in out_files if f.endswith(".cpp")],
137138
hdrs = [f for f in out_files if f.endswith(".h")],

bazel/cython.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""For compiling cython codes.
22
"""
33

4+
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
5+
46
# Adapted with modifications from
57
# grpc/bazel/cython_library.bzl
68
# Native Bazel rules don't exist yet to compile Cython code, but rules have
@@ -55,7 +57,7 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
5557
for src in pyx_srcs:
5658
stem = src.split(".")[0]
5759
shared_object_name = stem + ".so"
58-
native.cc_binary(
60+
cc_binary(
5961
name = shared_object_name,
6062
srcs = [stem + ".cpp"],
6163
deps = deps + ["@local_config_python//:python_headers"],

bazel/dependencies.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def fhirproto_dependencies(core_lib = False):
4545

4646
http_archive(
4747
name = "rules_cc",
48-
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"],
49-
strip_prefix = "rules_cc-0.0.9",
50-
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
48+
sha256 = "b8b918a85f9144c01f6cfe0f45e4f2838c7413961a8ff23bc0c6cdf8bb07a3b6",
49+
strip_prefix = "rules_cc-0.1.5",
50+
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.1.5/rules_cc-0.1.5.tar.gz",
5151
)
5252

5353
# Used for the FHIRPath parser runtime.

cc/google/fhir/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
licenses(["notice"])
25

36
package(default_visibility = ["//visibility:public"])

cc/google/fhir/fhir_path/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
13
load("//bazel:antlr4_cc.bzl", "antlr4_cc_lexer", "antlr4_cc_parser")
24

35
licenses(["notice"])

cc/google/fhir/json/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
licenses(["notice"])
25

36
package(default_visibility = ["//visibility:public"])

cc/google/fhir/r4/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
licenses(["notice"])
25

36
package(default_visibility = ["//visibility:public"])

cc/google/fhir/r5/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
package(default_visibility = ["//visibility:public"])
25

36
cc_library(

cc/google/fhir/status/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2+
13
licenses(["notice"])
24

35
package(default_visibility = ["//visibility:public"])

cc/google/fhir/stu3/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
licenses(["notice"])
25

36
package(default_visibility = ["//visibility:public"])

0 commit comments

Comments
 (0)