| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 1 | # Both shared objects, in one directory, under the names jolt's `:jolt/native` |
| 2 | # looks for. `just build` copies this directory's contents where a consumer |
| 3 | # points LD_LIBRARY_PATH. |
| 4 | genrule( |
| 5 | name = "libvidya", |
| 6 | out = "libvidya.so", |
| 7 | cmd = "cp $(location //crates/jolt-vidya:vidya-ffi[shared]) $OUT", |
| 8 | visibility = ["PUBLIC"], |
| 9 | ) |
| 10 | |
| 11 | genrule( |
| 12 | name = "libjoltmoq", |
| 13 | out = "libjoltmoq.so", |
| 14 | cmd = "cp $(location //crates/jolt-moq:jolt-moq[shared]) $OUT", |
| 15 | visibility = ["PUBLIC"], |
| 16 | ) |
| 17 | |
| 18 | filegroup( |
| 19 | name = "libs", |
| 20 | srcs = [":libjoltmoq", ":libvidya"], |
| 21 | visibility = ["PUBLIC"], |
| 22 | ) |
| Build libvidya for the phone, and hold the glue that boots it d942053 nandi 19d ago | 23 | |
| 24 | # The same C ABI, cross-compiled for the phone. The sources and the deps are |
| 25 | # the ones above; only the target configuration moves, which is what |
| 26 | # configured_alias is for — build scripts and proc macros still run on the |
| 27 | # host. There is no Android libjoltmoq: the media plane is V4L2 and PipeWire. |
| 28 | configured_alias( |
| 29 | name = "vidya-ffi-android", |
| 30 | actual = "//crates/jolt-vidya:vidya-ffi", |
| 31 | platform = "//platforms:android-arm64", |
| 32 | visibility = ["PUBLIC"], |
| 33 | ) |
| 34 | |
| 35 | genrule( |
| 36 | name = "libvidya-android", |
| 37 | out = "libvidya.so", |
| 38 | cmd = "cp $(location :vidya-ffi-android[shared]) $OUT", |
| 39 | visibility = ["PUBLIC"], |
| 40 | ) |