Repository navigation
build(release): LTO dist profile + debug-info sidecars on GitHub releases - #1846
Merged
Merged
Conversation
…ases - [profile.release]: debug=line-tables-only, split-debuginfo=packed - [profile.dist] (release-auto only): fat LTO + codegen-units=1 - template_native_build: cargo_profile/require_debug_sidecars inputs, dsymutil for Linux->mac cross, llvm-strip for cross lanes (macOS now stripped), loud strip failures, Stage debug sidecars + debug-<target> artifact, widened timeouts for dist - release-auto: dist profile, -debug sidecar assets on the GitHub release, ci/wheel_check.py gate before PyPI upload - ci/wheel_check.py ported from zccache (+ Mach-O STABS detection)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…ile soldr build in pyo3 policy test
…ed to produce them - release-auto: unset matrix key now means required (zccache idiom); 'x != false' coerced null to false and disabled the check everywhere - template: soldr's compile cache drops the apple-darwin .dSYM on both hit and miss, and post-hoc dsymutil yields a stub (debug map points at vanished staging objects). Relink fbuild-cli/fbuild-daemon with soldr --no-cache when a sidecar is missing; reject stub dSYMs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports zccache's release size and debug-sidecar pattern to fbuild.
Changes
[profile.release]:debug = "line-tables-only",split-debuginfo = "packed". Line tables go into a per-binary sidecar:.dwpon Linux,.dSYMon macOS,.pdbon Windows MSVC.[profile.dist](inherits = "release",lto = "fat",codegen-units = 1). Onlyrelease-auto.ymluses it, through the new template inputcargo_profile: dist. CI andbuild.ymlstay on the fastreleaseprofile.template_native_build.yml:cargo_profileandrequire_debug_sidecars.dsymutilitself at link time when split-debuginfo is packed, which is why this mirrors zccache.--strip-debug. The cross lanes (aarch64 Linux, both macOS) must usellvm-strip, so macOS binaries are now stripped. A missing strip tool or a failed strip now fails the step instead of being swallowed by|| true.debug-<target>artifact.distonly: build step 45→100 min, Python extension 30→60, job 90→200,SOLDR_CARGO_WAIT_TIMEOUT_SECS2700→6000.release-auto.yml:cargo_profile: distand requires sidecars, except on aarch64-pc-windows-msvc, which only warns (same carve-out as zccache).fbuild-<ver>-<target>-debug.{tar.gz,zip}as GitHub release assets. They are covered by the SHA256SUMS file and the attestation.ci/wheel_check.pyon the wheels before the PyPI artifact is uploaded.ci/wheel_check.py(ported from zccache, with tests inci/test_wheel_check.py):__DWARF-only check misses.Why fat LTO and not thin
Measured on the Linux
fbuild-daemon, stripped:lto = "thin"lto = "fat", cgu=1Thin LTO buys nothing, so
distuses fat LTO. Fat LTO costs link time, so it lives in its own profile with wider timeouts instead of slowing every CI build.Before / after
Before: the published 2.5.49 wheels are 41.0–45.2 MiB each, 214.2 MiB total.
uv run --no-project ci/wheel_check.py --pypi 2.5.49fails: both macOS wheels ship unstripped binaries with STABS debug maps.After, from a local
soldr build --profile dist --target x86_64-unknown-linux-musl -p fbuild-cli -p fbuild-daemon(18m19s wall on a 16-core workstation) followed bystrip --strip-debug:That is about 30 MiB per wheel, down from about 42.
--strip-debugkeeps the symbol table, as zccache does, so backtraces still show function names without the sidecar. That is why the daemon is 38.1 MB here and not the 34.1 MB of a full strip.Validation
.dwpsidecars were produced and the stripped binary runs.uv run --no-project python -m unittestforci.test_wheel_check,test_rust_toolchain_pins,test_workflow_concurrency,test_no_legacy_cross,test_fractional_workflows,test_publish_quotaandtest_setup_action: 78 tests pass. Both workflows parse as valid YAML.Not verified (needs a
publish=falserelease-auto dry run)dsymutilproduce the.dSYMat link time, and doesllvm-strip --strip-debughandle Mach-O correctly?fbuild.pdbandfbuild_daemon.pdb?.dwp?CARGO_BUILD_JOBS=1has not been measured. The 100-minute step budget is an estimate.