forked from nelhage/rules_boost
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.zstd
45 lines (43 loc) · 1.1 KB
/
BUILD.zstd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cc_library(
name = "zstd",
srcs = glob([
"lib/common/*.h",
"lib/common/*.c",
"lib/compress/*.h",
"lib/compress/*.c",
"lib/decompress/*.h",
"lib/decompress/*.c",
"lib/deprecated/*.h",
"lib/deprecated/*.c",
"lib/dictBuilder/*.h",
"lib/dictBuilder/*.c",
"lib/legacy/*.h",
"lib/legacy/*.c",
]) + select({
":linux_x86_64": ["lib/decompress/huf_decompress_amd64.S"],
"//conditions:default": [],
}),
hdrs = [
"lib/zdict.h",
"lib/zstd.h",
"lib/zstd_errors.h",
],
includes = ["lib"],
linkopts = [
"-pthread",
],
local_defines = [
"ZSTD_LEGACY_SUPPORT=4",
"ZSTD_MULTITHREAD",
"XXH_NAMESPACE=ZSTD_",
],
visibility = ["//visibility:public"],
)
# Hopefully, the need for these OSxCPU config_setting()s will be obviated by a fix to https://github.com/bazelbuild/platforms/issues/36
config_setting(
name = "linux_x86_64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)