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