ray/bazel/BUILD.hiredis
mehrdadn 37942ea1e7
Windows cleanup (#9508)
* Remove unneeded code for Windows

* Get rid of usleep()

* Make platform_shims includes non-transitive

Co-authored-by: Mehrdad <noreply@github.com>
2020-07-17 02:08:15 -07:00

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"],
)