11# Bazel build
22# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html
33
4+ load ("//bazel:python.bzl" , "py_test_module_list" )
45load ("//bazel:ray.bzl" , "COPTS" )
56
67cc_binary (
@@ -56,12 +57,12 @@ cc_library(
5657 strip_include_prefix = "include" ,
5758 visibility = ["//visibility:public" ],
5859 deps = [
59- "//src/ray/gcs/gcs_client:global_state_accessor_lib" ,
6060 "//:ray_common" ,
6161 "//src/ray/core_worker:core_worker_lib" ,
62+ "//src/ray/gcs/gcs_client:global_state_accessor_lib" ,
6263 "//src/ray/util" ,
63- "//src/ray/util:process" ,
6464 "//src/ray/util:cmd_line_utils" ,
65+ "//src/ray/util:process" ,
6566 "@boost//:callable_traits" ,
6667 "@boost//:dll" ,
6768 "@com_google_absl//absl/flags:flag" ,
@@ -109,6 +110,15 @@ cc_binary(
109110 }),
110111)
111112
113+ filegroup (
114+ name = "ray_cpp_pkg_files" ,
115+ srcs = [
116+ "default_worker" ,
117+ "libray_api.so" ,
118+ ],
119+ visibility = ["//visibility:private" ],
120+ )
121+
112122genrule (
113123 name = "ray_cpp_pkg" ,
114124 srcs = [
@@ -163,7 +173,7 @@ genrule(
163173 echo "$$WORK_DIR" > $@
164174 """ ,
165175 local = 1 ,
166- visibility = ["//visibility:public " ],
176+ visibility = ["//visibility:private " ],
167177)
168178
169179# test
@@ -200,8 +210,8 @@ cc_test(
200210 data = [
201211 "counter.so" ,
202212 "plus.so" ,
203- "ray_cpp_pkg" ,
204213 "src/ray/test/cluster/test_cross_language_invocation.py" ,
214+ ":ray_cpp_pkg_files" ,
205215 ],
206216 linkstatic = True ,
207217 tags = ["team:core" ],
@@ -223,7 +233,7 @@ cc_test(
223233 ],
224234 copts = COPTS ,
225235 data = [
226- "ray_cpp_pkg " ,
236+ ":ray_cpp_pkg_files " ,
227237 "//java:libio_ray_ray_test.jar" ,
228238 ],
229239 linkstatic = True ,
@@ -392,8 +402,6 @@ cc_binary(
392402 ],
393403)
394404
395- load ("//bazel:python.bzl" , "py_test_module_list" )
396-
397405py_test_module_list (
398406 size = "medium" ,
399407 extra_srcs = [],
0 commit comments