fabrica

hanna/fabrica

build: build tokio unoptimized to dodge a nightly codegen ICE

1f26eea · hanna committed on 2026-07-25

The pinned nightly ICEs compiling tokio's runtime type
Notified<Arc<multi_thread::Handle>> at any opt-level > 0. That type is
compiled inside tokio's own crate, so a per-package opt-level=0 override
dodges the ICE while everything else stays optimized. nix flake check is
green again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
1 files changed · +8 −3UnifiedSplit
Cargo.toml +8 −3
@@ -170,7 +170,12 @@ todo = "deny"
170170
171171 [profile.release]
172172 strip = true
173-# LTO is disabled: with aws-lc-sys (C) in the tree the Nix release build enables
174-# cross-language LTO, which triggers a rustc ICE compiling tokio under the pinned
175-# nightly. Re-enable once the toolchain is bumped past the bug.
176173 lto = false
174+
175+# The pinned nightly ICEs in LLVM codegen compiling tokio's runtime at any
176+# optimization level (a known codegen bug, unrelated to our code, in the type
177+# `Notified<Arc<multi_thread::Handle>>`). That type is compiled inside tokio's own
178+# crate, so building just tokio unoptimized dodges the ICE while every other crate
179+# stays optimized. Revisit when the fenix toolchain is bumped past the bug.
180+[profile.release.package.tokio]
181+opt-level = 0