build: omit debug info from ordinary release builds - #586
Merged
Conversation
shinaoka
enabled auto-merge (squash)
August 8, 2026 19:48
Repository rules reviewRepository rules review (bf6ee400e5903034f4b9f0b0da854f53b67e3cb8...2ea7457acf2f32ca2de4474d6f81690f09422784) Verdict: pass LLM review: 1 chunk(s) (11310 chars) in 10.5s; 0 finding(s) returned, 0 kept, 0 dropped by diff-anchor filtering. No findings. |
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.
Summary
Follow up merged PR #581 by changing ordinary release builds from
line-tables-onlytodebug = 0. Keep the existing full-debugrelease-debugprofile for Tensor4all.jl/C API source-level diagnostics and debugger sessions.Fixes #585.
Measured effect
Controlled full-workspace cold builds from the same PR #581 commit and lockfile:
.debug_*line-tables-onlydebug = 0Allocated output decreased by 11,404,726,272 bytes (77.27%). The C API shared library decreased from 118,446,592 to 23,072,104 bytes.
Changes
[profile.release] debug = 0; dev/test were already zero.[profile.release-debug] debug = true.cargo build --profile release-debug -p tensor4all-capiplusRUST_BACKTRACE=1for source-level Rust diagnostics.Optimization, numerical behavior, public APIs, C ABI, feature selection, assertions, and overflow behavior are unchanged. Ordinary backtraces may omit source file/line information; the explicit diagnostic profile preserves the prior full behavior.
Verification
cargo fmt --all -- --check— passedcargo clippy --workspace --all-targets -- -D warnings— passedcargo nextest run --release --workspace— 2524 passed, 14 skippedcargo test --doc --release --workspace— 117 passedcargo doc --workspace --no-deps— built (pre-existing rustdoc link warnings remain)./scripts/test-mdbook.sh— passed with the repository-standard target directorytensor4all-capirelease ELF — no.debug_*release-debugC API ELF — full.debug_*presentAn initial mdBook invocation with an externally overridden
CARGO_TARGET_DIRfailed because the existing script intentionally resolves$repo_root/target/release/deps; rerunning the prescribed command without that unrelated override passed. No source fix was needed.Documentation
docs/design/build-profiles.mddocs/worklogs/2026-08-09-release-debug-info-reduction.mdRelated: PR #248, PR #581, tensor4all/tensor4all-agent-rules#9.