Repository navigation
build: unify release LTO and symbol stripping - #5274
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
…port Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review Merged main (including the FFI changes from #5264 and #5265) and completed the quest: the remaining Linux aarch64 artifact matrix and before/after build-cost measurements move to the nightly size report quest, as accepted by the maintainer along with the (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Merge summary for
Locally, (Written by Claude Opus 5.5) |
Problem
Release builders apply inconsistent optimization settings. The original unified profile also broke binding generation: stripping the regular ELF symbol table removes metadata read by UniFFI, and the Windows C++ generator cannot decode the release static archive's large object format.
Approach
Set fat LTO and one codegen unit in the workspace release profile. Remove duplicate overrides from FFI, C, C++ and Nix builders. Keep symbol stripping for binaries, with a narrow
moq-ffipackage override that strips debug information while retaining generation metadata. Explicitly retain symbols in both profiling profiles, including their inherited package overrides.Generate C++ bindings from the linked cdylib on each platform, matching the other generators. Continue linking and packaging the static library for C++ consumers. Cargo supports separate symbol and debug-data stripping through its profile settings.
Impact
No public signatures, ABI, wire formats, package versions or release actions change. Release binaries use the common optimized profile and lose symbolized backtraces. FFI libraries retain the metadata needed by downstream generators; profiling builds keep debugging information. C++ applications still require no runtime shared-library deployment.
Alternatives
The narrow FFI exception revises the original stripping plan based on reproduced failures. Fat LTO and the default optimization level remain as selected in the quest.
Validation
The Linux x86_64 release matrix passed for all four packages. Artifact bytes:
The actual corrected FFI shared library generated nonempty Python and C++ bindings. These are current artifact measurements, not a controlled before/after size or link-cost comparison. Shared-host build wall times are retained locally but do not establish comparative build cost.
Full Nix
just checkpassed, including 6,955 default Rust tests, the feature matrix, bindings and 76 Python tests. Localjust test interop --allpassed, including cross-language publish/consume, refusal and finite-tail checks. Hosted Swift, macOS, MSVC C++ and Linux aarch64 FFI builds passed on implementation commit00f7bb8c0; the final commit only records quest evidence and passes quest validation.Hosted interop reached TS compliance and failed duration fidelity: 3.12 seconds captured from 20.06 seconds (ratio 0.156). The existing investigation in #5292 has a reproduced stdin-throughput defect and local evidence, but hosted causality remains unproven. No unrelated candidate change is imported here.
On copies of the same ELF library, the official generator fails after full symbol stripping and generates Python bindings after debug-only stripping. The C++ generator silently produces no files for the fully stripped ELF, so validation checks output files as well as exit status.
Using this PR's Windows release artifact, C++ generation fails on
moq_ffi.liband succeeds on its companion DLL. A dependency-free Cargo probe reproduces the inherited package override stripping profiling data; the explicit profiling override retains it.Follow-ups
The maintainer accepted the narrow
moq-ffistrip exception (alternative 1, keeping UniFFI metadata). The remaining measurements follow in nightly rather than gating this PR: the size report quest (quest/m1/size-report.md) now covers the Linux aarch64 artifact matrix, per-artifact release build time and the Go mirror's 100 MB limit. This PR completes and deletes the release profile quest. The earlier macOS size table is planning evidence, not a new measurement of this iteration. No releases are performed by this work.Hosted TS duration fidelity is tracked in #5292, independent of this change.
(Written by GPT-6 Astra, updated by Claude Opus 5.5)