-
-
Notifications
You must be signed in to change notification settings - Fork 423
Expand file tree
/
Copy pathbuild.zig.zon
More file actions
130 lines (130 loc) · 6.73 KB
/
Copy pathbuild.zig.zon
File metadata and controls
130 lines (130 loc) · 6.73 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.{
.name = .roc,
.version = "0.0.0",
.minimum_zig_version = "0.16.0",
// CPU baseline notes for each dependency.
//
// Dependencies fall into two groups that behave differently under `-Dcpu`:
//
// Prebuilt (`roc_deps_*`) arrive as compiled archives, so `-Dcpu` cannot
// reach them. They run at whatever CPU floor roc-lang/roc-bootstrap built
// them at.
//
// From source (`bytebox`, `zstd`) are compiled by us against the selected
// target, so they inherit `-Dcpu` exactly.
//
// Within both groups, what matters is whether a dependency does runtime CPU
// dispatch: run cpuid, then call one of several implementations that were
// each compiled at a different instruction set level. A dependency that
// dispatches keeps its fast paths on new CPUs while still starting on old
// ones, so lowering `-Dcpu` costs it nothing. A dependency that does not
// dispatch runs at its compiled-in floor everywhere. Each entry below
// records which it is, because that is what decides the cost of a lower
// floor.
//
// Verified by disassembling the x86_64-linux-musl archives on 2026-08-02.
// Re-check when bumping a dependency.
.dependencies = .{
// Fuzzing only, and lazy, so it never reaches a release binary.
.afl_kit = .{
.url = "https://github.com/bhansconnect/zig-afl-kit/archive/c1f7353e006cf326ffab0a35b6e454cb5d8a5d7b.tar.gz",
.hash = "afl_kit-0.1.0-NdJ3csgfAABGuiQ4P99kFuaVSy4DHMilISiGF_VKX3xl",
.lazy = true,
},
// The `roc_deps_*` archives below carry prebuilt LLVM, LLD, Binaryen and
// zlib. Every one of those libraries is plain baseline x86-64 except
// LLVM's vendored BLAKE3, which does textbook runtime dispatch:
// `blake3_dispatch.c` runs cpuid/xgetbv, caches the answer in
// `g_cpu_features`, and selects among portable/sse2/sse41/avx2/avx512
// implementations, so no above-baseline instruction is reachable unless
// its feature check passed. LLD, Binaryen and zlib contain no SIMD at
// all, so they have nothing to dispatch and give up nothing by running
// at baseline.
//
// These archives also ship a libzstd, but roc does not link it: only
// `z` is linked by name from these prebuilts, and `llvm_libs` in
// build.zig does not name zstd. Roc's zstd is the source dependency
// below.
//
// Net effect: these stay correct on any CPU of their architecture no
// matter which `-Dcpu` roc itself is built with.
.roc_deps_aarch64_macos_none = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/aarch64-macos-none.tar.xz",
.hash = "N-V-__8AAI7KVRG6J1Tp9i70olobTIwsFtoF_O54b2H3PnHZ",
.lazy = true,
},
.roc_deps_aarch64_linux_musl = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/aarch64-linux-musl.tar.xz",
.hash = "N-V-__8AAHzIKhc4RFMeZgW2iBmdo3tsRO5ZpNElA4Fm7THu",
.lazy = true,
},
.roc_deps_aarch64_windows_gnu = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/aarch64-windows-gnu.zip",
.hash = "N-V-__8AAHIzNhjDkOXYZnta3YtR_7LrghBqs1jXUvmCpjCu",
.lazy = true,
},
.roc_deps_arm_linux_musleabihf = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/arm-linux-musleabihf.tar.xz",
.hash = "N-V-__8AAGa9PxcZ8NvCQI5IquwW3ml3U9eoLBVIsRf28aBF",
.lazy = true,
},
.roc_deps_x86_linux_musl = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/x86-linux-musl.tar.xz",
.hash = "N-V-__8AAHRLihScN14ACLeAAXmQB7hKYq8Ii5wPWSXn18cl",
.lazy = true,
},
.roc_deps_x86_64_linux_musl = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/x86_64-linux-musl.tar.xz",
.hash = "N-V-__8AAGRcMhjhLwO3ey8ICFyBlvCT3_7XhM1xrEzWIBRD",
.lazy = true,
},
.roc_deps_x86_64_macos_none = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/x86_64-macos-none.tar.xz",
.hash = "N-V-__8AANLT0hHDnp788OOENaNTO0osBQU25xaf6WT4g75U",
.lazy = true,
},
.roc_deps_x86_64_windows_gnu = .{
.url = "https://github.com/roc-lang/roc-bootstrap/releases/download/llvm-21.1.8-scaling-2/x86_64-windows-gnu.zip",
.hash = "N-V-__8AALjVZhvbkIwdq0GDQB5m6lsopY3B2XZ2awlF4i2c",
.lazy = true,
},
// No runtime dispatch, and nothing that would benefit from it: every
// `@Vector` in bytebox implements wasm's fixed-128-bit `v128` semantics,
// which is already the natural SSE2 lowering. A lower `-Dcpu` costs it
// nothing.
.bytebox = .{
.url = "https://github.com/rtfeldman/bytebox/archive/6565220e5d16eb230b05a85fd9609f280dc249c6.tar.gz",
.hash = "bytebox-0.0.1-SXc2sTB9DwDob3McsuMCelmt_O2h3mKZAnX2kVO1Hw5l",
},
// Used for `roc bundle`, `roc unbundle`, and downloading .tar.zst bundles.
//
// zstd has runtime BMI2 dispatch, but it enables that dispatch only when
// BMI2 is *not* already on at compile time: `DYNAMIC_BMI2` in
// lib/common/portability_macros.h is gated on `!defined(__BMI2__)`.
//
// So building this at x86-64-v3 turns the dispatch off and hardcodes
// BMI2 into every entry point, while building at baseline or v2 compiles
// both variants and picks between them via zstd's own cpuid at runtime.
// Building it at v3 is therefore strictly worse than building it at
// baseline: it gives up portability without gaining any speed on the
// CPUs that do have BMI2.
.zstd = .{
.url = "https://github.com/allyourcodebase/zstd/archive/e1a501be57f42c541e8a5597e4b59a074dfd09a3.tar.gz", // 1.5.7-1
.hash = "zstd-1.5.7-1-KEItkAMwAAD6OKY3m0OOmXG7aL-aLUfrDqbP5J5oYapU",
},
// Coverage tooling only, and lazy, so it never reaches a release binary.
.kcov = .{
.url = "https://github.com/roc-lang/zig-kcov/archive/5e1954e53ce775a6ecf65abd03ae67deee64ac3c.tar.gz",
.hash = "kcov-42.0.1-EuAG4XacCwBu0G8YHvv6sFHfbMPZuwyBuZGqcRMi8IXq",
.lazy = true,
},
},
.fingerprint = 0x9eea22a6c3bd0034,
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"LICENSE",
"legal_details",
},
}