nandi/jolt-nativepublic Fork 0
460541b3803224e2b0199f6384c01f9635c6d618
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

BUCK · 50 lines · 1.8 KBPython Blame HistoryRaw
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago1load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain")
2load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
3load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain")
4load("@prelude//toolchains:rust.bzl", "system_rust_toolchain")
5
6# Tools come from the DotSlash files in scripts/, so the build depends on
7# pinned upstream releases rather than whatever the host happens to have. The
8# prelude's system toolchains resolve their tools through PATH, so buck2 must
9# be invoked with scripts/ prepended — see the `buck` recipe in justfile.
10#
11# This is the same arrangement .cargo/config.toml used to describe: zig cc
12# carries its own glibc sysroot, which is why this repo builds on a machine
13# with no `cc` at all. Unlike vidya there is no Android row here — both shared
14# objects this repo ships are desktop, and the APK takes its libvidya from
15# vidya's own buck2 build.
16system_cxx_toolchain(
17 name = "cxx",
18 compiler = "scripts/zcc",
19 compiler_type = "clang",
20 cxx_compiler = "scripts/zxx",
21 linker = "scripts/zcc",
22 visibility = ["PUBLIC"],
23)
24
25system_genrule_toolchain(
26 name = "genrule",
27 visibility = ["PUBLIC"],
28)
29
30system_python_bootstrap_toolchain(
31 name = "python_bootstrap",
32 visibility = ["PUBLIC"],
33)
34
35system_rust_toolchain(
36 name = "rust",
37 default_edition = "2021",
38 rustc_flags = ["-Clinker=scripts/zcc"],
39 rustc_target_triple = select({
40 "prelude//os:linux": select({
41 "prelude//cpu:arm64": "aarch64-unknown-linux-gnu",
42 "prelude//cpu:x86_64": "x86_64-unknown-linux-gnu",
43 }),
44 "prelude//os:macos": select({
45 "prelude//cpu:arm64": "aarch64-apple-darwin",
46 "prelude//cpu:x86_64": "x86_64-apple-darwin",
47 }),
48 }),
49 visibility = ["PUBLIC"],
50)