mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
190 lines
5.3 KiB
Text
190 lines
5.3 KiB
Text
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
|
|
|
COPTS = ["-DARROW_USE_GLOG"]
|
|
|
|
cc_library(
|
|
name = "arrow",
|
|
srcs = [
|
|
"cpp/src/arrow/buffer.cc",
|
|
"cpp/src/arrow/io/interfaces.cc",
|
|
"cpp/src/arrow/memory_pool.cc",
|
|
"cpp/src/arrow/status.cc",
|
|
"cpp/src/arrow/util/io-util.cc",
|
|
"cpp/src/arrow/util/logging.cc",
|
|
"cpp/src/arrow/util/memory.cc",
|
|
"cpp/src/arrow/util/string_builder.cc",
|
|
"cpp/src/arrow/util/thread-pool.cc",
|
|
],
|
|
hdrs = [
|
|
"cpp/src/arrow/buffer.h",
|
|
"cpp/src/arrow/io/interfaces.h",
|
|
"cpp/src/arrow/memory_pool.h",
|
|
"cpp/src/arrow/status.h",
|
|
"cpp/src/arrow/util/bit-util.h",
|
|
"cpp/src/arrow/util/io-util.h",
|
|
"cpp/src/arrow/util/logging.h",
|
|
"cpp/src/arrow/util/macros.h",
|
|
"cpp/src/arrow/util/memory.h",
|
|
"cpp/src/arrow/util/stl.h",
|
|
"cpp/src/arrow/util/string.h",
|
|
"cpp/src/arrow/util/string_builder.h",
|
|
"cpp/src/arrow/util/string_view.h",
|
|
"cpp/src/arrow/util/thread-pool.h",
|
|
"cpp/src/arrow/util/type_traits.h",
|
|
"cpp/src/arrow/util/ubsan.h",
|
|
"cpp/src/arrow/util/visibility.h",
|
|
"cpp/src/arrow/util/windows_compatibility.h",
|
|
"cpp/src/arrow/vendored/string_view.hpp",
|
|
"cpp/src/arrow/vendored/xxhash/xxhash.c",
|
|
"cpp/src/arrow/vendored/xxhash/xxhash.h",
|
|
],
|
|
copts = COPTS,
|
|
strip_include_prefix = "cpp/src",
|
|
deps = [
|
|
"@boost//:filesystem",
|
|
"@com_github_google_glog//:glog",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "plasma_client",
|
|
srcs = [
|
|
"cpp/src/plasma/client.cc",
|
|
"cpp/src/plasma/common.cc",
|
|
"cpp/src/plasma/fling.cc",
|
|
"cpp/src/plasma/io.cc",
|
|
"cpp/src/plasma/malloc.cc",
|
|
"cpp/src/plasma/plasma.cc",
|
|
"cpp/src/plasma/protocol.cc",
|
|
],
|
|
hdrs = [
|
|
"cpp/src/plasma/client.h",
|
|
"cpp/src/plasma/common.h",
|
|
"cpp/src/plasma/common_generated.h",
|
|
"cpp/src/plasma/compat.h",
|
|
"cpp/src/plasma/external_store.h",
|
|
"cpp/src/plasma/fling.h",
|
|
"cpp/src/plasma/io.h",
|
|
"cpp/src/plasma/malloc.h",
|
|
"cpp/src/plasma/plasma.h",
|
|
"cpp/src/plasma/plasma_generated.h",
|
|
"cpp/src/plasma/protocol.h",
|
|
],
|
|
copts = COPTS,
|
|
strip_include_prefix = "cpp/src",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":arrow",
|
|
":common_fbs",
|
|
":plasma_fbs",
|
|
"@com_github_google_glog//:glog",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "libplasma_java.so",
|
|
srcs = [
|
|
"cpp/src/plasma/lib/java/org_apache_arrow_plasma_PlasmaClientJNI.cc",
|
|
"cpp/src/plasma/lib/java/org_apache_arrow_plasma_PlasmaClientJNI.h",
|
|
":jni.h",
|
|
":jni_md.h",
|
|
],
|
|
includes = [
|
|
".",
|
|
"cpp/src",
|
|
],
|
|
linkshared = 1,
|
|
linkstatic = 1,
|
|
deps = [":plasma_client"],
|
|
)
|
|
|
|
genrule(
|
|
name = "copy_jni_h",
|
|
srcs = ["@bazel_tools//tools/jdk:jni_header"],
|
|
outs = ["jni.h"],
|
|
cmd = "cp -f $< $@",
|
|
)
|
|
|
|
genrule(
|
|
name = "copy_jni_md_h",
|
|
srcs = select({
|
|
"@bazel_tools//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
|
|
"@bazel_tools//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
|
|
"//conditions:default": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
|
|
}),
|
|
outs = ["jni_md.h"],
|
|
cmd = "cp -f $< $@",
|
|
)
|
|
|
|
genrule(
|
|
name = "plasma-jni-darwin-compat",
|
|
srcs = [":libplasma_java.so"],
|
|
outs = ["libplasma_java.dylib"],
|
|
cmd = "cp $< $@",
|
|
output_to_bindir = 1,
|
|
)
|
|
|
|
cc_library(
|
|
name = "plasma_lib",
|
|
srcs = [
|
|
"cpp/src/plasma/dlmalloc.cc",
|
|
"cpp/src/plasma/events.cc",
|
|
"cpp/src/plasma/eviction_policy.cc",
|
|
"cpp/src/plasma/external_store.cc",
|
|
"cpp/src/plasma/plasma_allocator.cc",
|
|
"cpp/src/plasma/thirdparty/ae/ae.c",
|
|
],
|
|
hdrs = [
|
|
"cpp/src/plasma/events.h",
|
|
"cpp/src/plasma/eviction_policy.h",
|
|
"cpp/src/plasma/external_store.h",
|
|
"cpp/src/plasma/plasma_allocator.h",
|
|
"cpp/src/plasma/store.h",
|
|
"cpp/src/plasma/thirdparty/ae/ae.h",
|
|
"cpp/src/plasma/thirdparty/ae/ae_epoll.c",
|
|
"cpp/src/plasma/thirdparty/ae/ae_evport.c",
|
|
"cpp/src/plasma/thirdparty/ae/ae_kqueue.c",
|
|
"cpp/src/plasma/thirdparty/ae/ae_select.c",
|
|
"cpp/src/plasma/thirdparty/ae/config.h",
|
|
"cpp/src/plasma/thirdparty/ae/zmalloc.h",
|
|
"cpp/src/plasma/thirdparty/dlmalloc.c",
|
|
],
|
|
copts = COPTS,
|
|
strip_include_prefix = "cpp/src",
|
|
deps = [
|
|
":plasma_client",
|
|
"@com_github_google_glog//:glog",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "plasma_store_server",
|
|
srcs = [
|
|
"cpp/src/plasma/store.cc",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [":plasma_lib"],
|
|
)
|
|
|
|
FLATC_ARGS = [
|
|
"--gen-object-api",
|
|
"--gen-mutable",
|
|
"--scoped-enums",
|
|
]
|
|
|
|
flatbuffer_cc_library(
|
|
name = "common_fbs",
|
|
srcs = ["cpp/src/plasma/format/common.fbs"],
|
|
flatc_args = FLATC_ARGS,
|
|
out_prefix = "cpp/src/plasma/",
|
|
)
|
|
|
|
flatbuffer_cc_library(
|
|
name = "plasma_fbs",
|
|
srcs = ["cpp/src/plasma/format/plasma.fbs"],
|
|
flatc_args = FLATC_ARGS,
|
|
includes = ["cpp/src/plasma/format/common.fbs"],
|
|
out_prefix = "cpp/src/plasma/",
|
|
)
|
|
|
|
exports_files(["cpp/src/plasma/format/common.fbs"])
|