Skip to content

cxa-throw: Don't auto-detect#458

Open
edolstra wants to merge 1 commit into
mainfrom
unconditional-cxa-throw
Open

cxa-throw: Don't auto-detect#458
edolstra wants to merge 1 commit into
mainfrom
unconditional-cxa-throw

Conversation

@edolstra
Copy link
Copy Markdown
Collaborator

@edolstra edolstra commented May 15, 2026

Motivation

This speeds up running meson (re)configuration from 16.6s to 2.9s.

More importantly though, it's better to just specify that we expect this to work rather than try to compile something, since that can silently mask errors and disable this feature.

Context

Summary by CodeRabbit

  • Refactor
    • Simplified build configuration by removing runtime capability probes and replacing them with deterministic platform-based wiring.
    • On Linux, exception handling support is enabled unconditionally; static-library builds configure wrap-based support, while non-static builds always include the interpose variant.
    • Reduced conditional checks and removed probe-related build variables, lowering maintenance complexity with no change to end-user behavior.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7ca49eb6-ef74-4e3f-9675-36353494cf41

📥 Commits

Reviewing files that changed from the base of the PR and between 84a8cbe and 2e8c23b.

📒 Files selected for processing (1)
  • nix-meson-build-support/common/cxa-throw/meson.build

📝 Walkthrough

Walkthrough

On Linux the Meson build now sets have_cxa_throw = true; for static builds it defines wrap_cxa_throw_args. For non-static builds it always builds interpose-cxa-throw and exposes cxa_throw_dep via link_whole. Runtime cxx.run probes were removed.

Changes

Linux CXA throw wiring

Layer / File(s) Summary
Enable on Linux & static wrap args
nix-meson-build-support/common/cxa-throw/meson.build
When host_machine.system() == 'linux', have_cxa_throw is set to true. If get_option('default_library') == 'static', wrap_cxa_throw_args is defined for the existing wrap-cxa-throw static-library wiring; probe variables were removed.
Interpose static lib and cxa_throw_dep
nix-meson-build-support/common/cxa-throw/meson.build
In the non-static branch the build now unconditionally builds interpose-cxa-throw (static) and declares cxa_throw_dep via link_whole to that library; prior probe-driven conditionals are removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped into Meson, tidy and quick,
Removed the probes that made it stick,
On Linux now the flags are set,
One steady link, no more regret,
A cleaner build — that's my trick.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'cxa-throw: Don't auto-detect' directly and concisely captures the main change: removing auto-detection of cxa-throw capability in favor of deterministic wiring, which is the primary objective and focus of the entire changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch unconditional-cxa-throw

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

@github-actions github-actions Bot temporarily deployed to pull request May 15, 2026 08:57 Inactive
@edolstra edolstra force-pushed the unconditional-cxa-throw branch from a9dd4d6 to 82e906f Compare May 15, 2026 09:00
@github-actions github-actions Bot temporarily deployed to pull request May 15, 2026 09:02 Inactive
@edolstra edolstra force-pushed the unconditional-cxa-throw branch from 82e906f to 84a8cbe Compare May 15, 2026 09:55
@github-actions github-actions Bot temporarily deployed to pull request May 15, 2026 10:01 Inactive
This speeds up running meson (re)configuration from 16.6s to 2.9s.

More importantly though, it's better to just specify that we expect
this to work rather than try to compile something, since that can
silently mask errors and disable this feature.
@edolstra edolstra force-pushed the unconditional-cxa-throw branch from 84a8cbe to 2e8c23b Compare May 15, 2026 10:10
@github-actions github-actions Bot temporarily deployed to pull request May 15, 2026 10:16 Inactive
Copy link
Copy Markdown
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was really proud of this autodetection 😭

But I do like speed, so 🚀

@edolstra edolstra added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2026
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.

2 participants