forked from urbit/vere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
112 lines (104 loc) · 2.53 KB
/
BUILD.bazel
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#
# LIBRARIES
#
load("//bazel:common_settings.bzl", "vere_library")
vere_library(
name = "noun",
srcs = glob(
[
"**/*.c",
"**/*.h",
"jets/*.h",
"jets/**/*.c",
],
exclude = [
"noun.h",
"*_tests.c",
],
),
hdrs = ["noun.h"],
includes = ["."],
linkopts = select({
# NOTE: macOS builds fail to link the `u3o_Config` symbol (and maybe
# others) without this. We should figure out why, and remove this.
"@platforms//os:macos": ["-force_load $(GENDIR)/pkg/noun/libnoun.a"],
"//conditions:default": [],
}),
linkstatic = True,
local_defines = ["U3_GUARD_PAGE"],
visibility = ["//pkg:__subpackages__"],
deps = [
"//pkg/c3",
"//pkg/ent",
"//pkg/ur",
"@gmp",
"@murmur3",
"@openssl",
"@pdjson",
"@sigsegv",
"@softfloat",
"@urcrypt",
] + select({
"@platforms//os:macos": ["//pkg/noun/platform/darwin"],
"@platforms//os:linux": ["//pkg/noun/platform/linux"],
"//conditions:default": [],
}),
)
#
# TESTS
#
cc_test(
name = "hashtable_tests",
timeout = "short",
srcs = ["hashtable_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [":noun"],
)
cc_test(
name = "jets_tests",
timeout = "short",
srcs = ["jets_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [":noun"],
)
cc_test(
name = "nock_tests",
timeout = "short",
srcs = ["nock_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [":noun"],
)
cc_test(
name = "retrieve_tests",
timeout = "short",
srcs = ["retrieve_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [":noun"],
)
cc_test(
name = "serial_tests",
timeout = "short",
srcs = ["serial_tests.c"],
features = select({
"@platforms//os:linux": ["fully_static_link"],
"//conditions:default": [],
}),
visibility = ["//visibility:private"],
deps = [":noun"],
)