1
1
# Bazel build
2
2
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html
3
3
4
+ load ("//bazel:python.bzl" , "py_test_module_list" )
4
5
load ("//bazel:ray.bzl" , "COPTS" )
5
6
6
7
cc_binary (
@@ -56,12 +57,12 @@ cc_library(
56
57
strip_include_prefix = "include" ,
57
58
visibility = ["//visibility:public" ],
58
59
deps = [
59
- "//src/ray/gcs/gcs_client:global_state_accessor_lib" ,
60
60
"//:ray_common" ,
61
61
"//src/ray/core_worker:core_worker_lib" ,
62
+ "//src/ray/gcs/gcs_client:global_state_accessor_lib" ,
62
63
"//src/ray/util" ,
63
- "//src/ray/util:process" ,
64
64
"//src/ray/util:cmd_line_utils" ,
65
+ "//src/ray/util:process" ,
65
66
"@boost//:callable_traits" ,
66
67
"@boost//:dll" ,
67
68
"@com_google_absl//absl/flags:flag" ,
@@ -109,6 +110,15 @@ cc_binary(
109
110
}),
110
111
)
111
112
113
+ filegroup (
114
+ name = "ray_cpp_pkg_files" ,
115
+ srcs = [
116
+ "default_worker" ,
117
+ "libray_api.so" ,
118
+ ],
119
+ visibility = ["//visibility:private" ],
120
+ )
121
+
112
122
genrule (
113
123
name = "ray_cpp_pkg" ,
114
124
srcs = [
@@ -163,7 +173,7 @@ genrule(
163
173
echo "$$WORK_DIR" > $@
164
174
""" ,
165
175
local = 1 ,
166
- visibility = ["//visibility:public " ],
176
+ visibility = ["//visibility:private " ],
167
177
)
168
178
169
179
# test
@@ -200,8 +210,8 @@ cc_test(
200
210
data = [
201
211
"counter.so" ,
202
212
"plus.so" ,
203
- "ray_cpp_pkg" ,
204
213
"src/ray/test/cluster/test_cross_language_invocation.py" ,
214
+ ":ray_cpp_pkg_files" ,
205
215
],
206
216
linkstatic = True ,
207
217
tags = ["team:core" ],
@@ -223,7 +233,7 @@ cc_test(
223
233
],
224
234
copts = COPTS ,
225
235
data = [
226
- "ray_cpp_pkg " ,
236
+ ":ray_cpp_pkg_files " ,
227
237
"//java:libio_ray_ray_test.jar" ,
228
238
],
229
239
linkstatic = True ,
@@ -392,8 +402,6 @@ cc_binary(
392
402
],
393
403
)
394
404
395
- load ("//bazel:python.bzl" , "py_test_module_list" )
396
-
397
405
py_test_module_list (
398
406
size = "medium" ,
399
407
extra_srcs = [],
0 commit comments