flake: link host code with mold on Linux; DECISIONS: mold, and no LTO
mold applies to the host target only, in the dev shell, the crane builds, and the packaged binary (proc macros and build scripts of plugins). A rebuild of the host test binary after a change takes 0.9 s (15 s with GNU ld). Measured LTO: no gain worth 4 more minutes per release build.
This commit is contained in:
@@ -75,6 +75,13 @@ a plugin, or a change that the agent makes to itself.
|
||||
`sdk/<hash>/`. A path that depends only on the content of the SDK lets
|
||||
cargo reuse the compiled SDK in every world. Tests run in the release
|
||||
profile, so that they share compiled crates with the release build.
|
||||
- **mold links host code where Nix provides it.** On Linux, the dev shell,
|
||||
the Nix builds, and the packaged `sausage` (for the proc macros and build
|
||||
scripts of plugins) link with mold, much faster than GNU ld. Plugins for
|
||||
`wasm32-wasip2` link with rust-lld. Without Nix, the default linker stays.
|
||||
- **No LTO.** Measured: fat LTO makes the binary 28 % smaller, but compiles
|
||||
plugins and answers calls at most 5–8 % faster, for 4 more minutes per
|
||||
release build. Thin LTO brings nothing.
|
||||
- **Discovery has a deadline of 10 seconds.** It is an internal call of the
|
||||
core, not a limit on plugins. Without it, one plugin that does not answer
|
||||
would block every activation.
|
||||
|
||||
Reference in New Issue
Block a user