Skip to content

build: omit debug info from ordinary release builds - #586

Merged
shinaoka merged 5 commits into
mainfrom
codex/release-debug-opt-in
Aug 8, 2026
Merged

build: omit debug info from ordinary release builds#586
shinaoka merged 5 commits into
mainfrom
codex/release-debug-opt-in

Conversation

@shinaoka

@shinaoka shinaoka commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Follow up merged PR #581 by changing ordinary release builds from line-tables-only to debug = 0. Keep the existing full-debug release-debug profile 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:

Profile Allocated target Wall time ELFs with .debug_*
line-tables-only 14,759,100,416 B 478.01 s 206 / 206
debug = 0 3,354,374,144 B 456.98 s 0 / 206

Allocated 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

  • Set ordinary [profile.release] debug = 0; dev/test were already zero.
  • Retain [profile.release-debug] debug = true.
  • Document cargo build --profile release-debug -p tensor4all-capi plus RUST_BACKTRACE=1 for source-level Rust diagnostics.
  • Add durable build-profile design and measurement worklog.

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 metadata/tree parsing — passed
  • cargo fmt --all -- --check — passed
  • cargo clippy --workspace --all-targets -- -D warnings — passed
  • cargo nextest run --release --workspace — 2524 passed, 14 skipped
  • cargo test --doc --release --workspace — 117 passed
  • cargo doc --workspace --no-deps — built (pre-existing rustdoc link warnings remain)
  • ./scripts/test-mdbook.sh — passed with the repository-standard target directory
  • ordinary tensor4all-capi release ELF — no .debug_*
  • release-debug C API ELF — full .debug_* present
  • repository-rules review — pass, no findings

An initial mdBook invocation with an externally overridden CARGO_TARGET_DIR failed 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.md
  • docs/worklogs/2026-08-09-release-debug-info-reduction.md

Related: PR #248, PR #581, tensor4all/tensor4all-agent-rules#9.

@shinaoka
shinaoka enabled auto-merge (squash) August 8, 2026 19:48
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Repository rules review

Repository 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.

@shinaoka
shinaoka merged commit 2b0cb8c into main Aug 8, 2026
11 checks passed
@shinaoka
shinaoka deleted the codex/release-debug-opt-in branch August 8, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop line tables from ordinary release builds

1 participant