mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00

* Remove unneeded code for Windows * Get rid of usleep() * Make platform_shims includes non-transitive Co-authored-by: Mehrdad <noreply@github.com>
49 lines
1,017 B
Text
49 lines
1,017 B
Text
COPTS = [] + select({
|
|
"@bazel_tools//src/conditions:windows": [
|
|
"-D_CRT_DECLARE_NONSTDC_NAMES=0", # don't define off_t, to avoid conflicts
|
|
],
|
|
"//conditions:default": [
|
|
],
|
|
}) + select({
|
|
"@//:msvc-cl": [
|
|
],
|
|
"//conditions:default": [
|
|
# Old versions of GCC (e.g. 4.9.2) can fail to compile Redis's C without this.
|
|
"-std=c99",
|
|
],
|
|
})
|
|
|
|
# This library is for internal hiredis use, because hiredis assumes a
|
|
# different include prefix for itself than external libraries do.
|
|
cc_library(
|
|
name = "_hiredis",
|
|
hdrs = [
|
|
"dict.c",
|
|
],
|
|
copts = COPTS,
|
|
)
|
|
|
|
cc_library(
|
|
name = "hiredis",
|
|
srcs = glob(
|
|
[
|
|
"*.c",
|
|
"*.h",
|
|
],
|
|
exclude =
|
|
[
|
|
"ssl.c",
|
|
"test.c",
|
|
],
|
|
),
|
|
hdrs = glob([
|
|
"*.h",
|
|
"adapters/*.h",
|
|
]),
|
|
copts = COPTS,
|
|
include_prefix = "hiredis",
|
|
deps = [
|
|
":_hiredis",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|