1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- load ("@rules_cc//cc:cc_library.bzl" , "cc_library" )
1615load ("@rules_cc//cc:cc_test.bzl" , "cc_test" )
17-
18- # copybara:uncomment load("@bazel_skylib//lib:selects.bzl", "selects")
19- # copybara:uncomment load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
2016load ("//litert/build_common:litert_build_defs.bzl" , "litert_dynamic_lib" )
2117load ("//litert/build_common:special_rule.bzl" , "litert_android_linkopts" )
2218load ("//litert/integration_test:litert_device.bzl" , "litert_device_test" )
@@ -36,52 +32,12 @@ package(
3632#
3733# genrule(
3834# name = "sb_api_late_binding_cc",
39- # srcs = ["INTERNAL_SB_PKG:sb_api_late_binding.cc "],
35+ # srcs = ["INTERNAL_SB_API_LATE_BINDING "],
4036# outs = ["sb_api_late_binding.cc"],
4137# # Replace g3 header path with that of the copy made above.
4238# cmd = "sed 's|third_party/odml/infra/southbound/sb_api.h|third_party/odml/litert/litert/vendors/google_tensor/dispatch/sb_api.h|g' $< > $@",
4339# )
44- #
45- # bool_flag(
46- # name = "southbound_static_link",
47- # build_setting_default = False,
48- # )
49- #
50- # config_setting(
51- # name = "southbound_static_link_flag_set",
52- # flag_values = {
53- # ":southbound_static_link": "True",
54- # },
55- # visibility = ["//visibility:private"],
56- # )
57- #
58- # selects.config_setting_group(
59- # name = "southbound_static_link_enable",
60- # match_any = [
61- # ":southbound_static_link_flag_set",
62- # "@org_tensorflow//tensorflow:linux_x86_64",
63- # ],
64- # )
65- #
66- # cc_library(
67- # name = "southbound",
68- # srcs = select({
69- # ":southbound_static_link_enable": [],
70- # "//conditions:default": ["sb_api_late_binding.cc"],
71- # }),
72- # hdrs = ["sb_api.h"],
73- # deps = select({
74- # ":southbound_static_link_enable": ["INTERNAL_SB_PKG:sb_api_impl"],
75- # "//conditions:default": [],
76- # }),
77- # )
78- # copybara:uncomment_end_and_comment_begin
79- cc_library (
80- name = "southbound" ,
81- srcs = ["sb_api_late_binding.cc" ],
82- hdrs = ["sb_api.h" ],
83- )
84- # copybara:comment_end
40+ # copybara:uncomment_end
8541
8642litert_dynamic_lib (
8743 name = "dispatch_api" ,
@@ -90,13 +46,15 @@ litert_dynamic_lib(
9046 "litert_dispatch_device_context.cc" ,
9147 "litert_dispatch_graph.cc" ,
9248 "litert_dispatch_invocation_context.cc" ,
49+ "sb_api_late_binding.cc" ,
9350 ],
9451 hdrs = [
9552 "dispatch_api.h" ,
9653 "litert_dispatch_device_context.h" ,
9754 "litert_dispatch_graph.h" ,
9855 "litert_dispatch_invocation_context.h" ,
9956 "litert_dispatch_metrics.h" ,
57+ "sb_api.h" ,
10058 "sb_dispatch_annotations.h" ,
10159 ],
10260 copts = [
@@ -120,7 +78,6 @@ litert_dynamic_lib(
12078 ],
12179 visibility = ["//litert:litert_public" ],
12280 deps = [
123- ":southbound" ,
12481 "@com_google_absl//absl/container:flat_hash_set" ,
12582 "@com_google_absl//absl/strings:string_view" ,
12683 "//litert/c/internal:litert_logging" ,
0 commit comments