mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
support dynamic library loading in C++ worker (#13734)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# Bazel development build for C++ API.
|
||||
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html
|
||||
|
||||
load("//bazel:ray.bzl", "COPTS")
|
||||
|
||||
cc_binary(
|
||||
name = "example",
|
||||
srcs = glob([
|
||||
"*.cc",
|
||||
]),
|
||||
args = [
|
||||
"--dynamic-library-path $(location example.so)",
|
||||
],
|
||||
copts = COPTS,
|
||||
data = [
|
||||
"example.so",
|
||||
"//cpp:ray_cpp_pkg",
|
||||
],
|
||||
linkstatic = True,
|
||||
deps = [
|
||||
"//cpp:ray_api",
|
||||
"@com_github_gflags_gflags//:gflags",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "example.so",
|
||||
srcs = glob([
|
||||
"*.cc",
|
||||
]),
|
||||
copts = COPTS,
|
||||
linkstatic = True,
|
||||
deps = [
|
||||
"//cpp:ray_api",
|
||||
"@com_github_gflags_gflags//:gflags",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user