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
|
# Both shared objects, in one directory, under the names jolt's `:jolt/native`
# looks for. `just build` copies this directory's contents where a consumer
# points LD_LIBRARY_PATH.
genrule(
name = "libvidya",
out = "libvidya.so",
cmd = "cp $(location //crates/jolt-vidya:vidya-ffi[shared]) $OUT",
visibility = ["PUBLIC"],
)
genrule(
name = "libjolttui",
out = "libjolttui.so",
cmd = "cp $(location //crates/jolt-tui:jolt-tui[shared]) $OUT",
visibility = ["PUBLIC"],
)
genrule(
name = "libjoltmoq",
out = "libjoltmoq.so",
cmd = "cp $(location //crates/jolt-moq:jolt-moq[shared]) $OUT",
visibility = ["PUBLIC"],
)
filegroup(
name = "libs",
srcs = [":libjoltmoq", ":libjolttui", ":libvidya"],
visibility = ["PUBLIC"],
)
# The same two C ABIs, cross-compiled for the phone. The sources and the deps
# are the ones above; only the target configuration moves, which is what
# configured_alias is for — build scripts and proc macros still run on the host.
configured_alias(
name = "vidya-ffi-android",
actual = "//crates/jolt-vidya:vidya-ffi",
platform = "//platforms:android-arm64",
visibility = ["PUBLIC"],
)
genrule(
name = "libvidya-android",
out = "libvidya.so",
cmd = "cp $(location :vidya-ffi-android[shared]) $OUT",
visibility = ["PUBLIC"],
)
configured_alias(
name = "jolt-moq-android",
actual = "//crates/jolt-moq:jolt-moq",
platform = "//platforms:android-arm64",
visibility = ["PUBLIC"],
)
genrule(
name = "libjoltmoq-android",
out = "libjoltmoq.so",
cmd = "cp $(location :jolt-moq-android[shared]) $OUT",
visibility = ["PUBLIC"],
)
# Both device objects, for a build that wants them in one go.
filegroup(
name = "libs-android",
srcs = [":libjoltmoq-android", ":libvidya-android"],
visibility = ["PUBLIC"],
)
|