Skip to content

Add Windows GNU unwind compatibility shim - #1636

Merged
oferchen merged 1 commit into
masterfrom
fix-linking-errors-in-oc-rsync-bin
Oct 30, 2025
Merged

oferchen merged 1 commit into
masterfrom
fix-linking-errors-in-oc-rsync-bin

Conversation

@oferchen

@oferchen oferchen commented Oct 30, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add a rsync-windows-gnu-eh compatibility crate that forwards the legacy libgcc unwind hooks to libunwind on windows-gnu
  • depend on the shim from the client and daemon binaries when building for the windows-gnu target so the symbols are linked
  • register the new crate in the workspace manifest

Testing

  • cargo check

@oferchen
oferchen merged commit cd39c43 into master Oct 30, 2025
@oferchen
oferchen deleted the fix-linking-errors-in-oc-rsync-bin branch October 30, 2025 02:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

Comment on lines +22 to +34
/// Forwards `rsbegin`'s registration hook to libunwind.
#[no_mangle]
pub unsafe extern "C" fn ___register_frame_info(
eh_frame: *const u8,
object: *mut c_void,
) {
__register_frame_info(eh_frame, object);
}

/// Forwards `rsbegin`'s deregistration hook to libunwind.
#[no_mangle]
pub unsafe extern "C" fn ___deregister_frame_info(eh_frame: *const u8) {
__deregister_frame_info(eh_frame);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard against duplicate legacy unwind symbols

The shim unconditionally defines ___register_frame_info and ___deregister_frame_info for every windows-gnu build. Existing MinGW toolchains already export these legacy libgcc symbols, so compiling the workspace on those toolchains will now fail with multiple-definition link errors even though the build previously succeeded. The crate needs to either use weak linkage or gate these definitions on toolchains that actually miss the symbols; otherwise normal Windows‑GNU builds are broken.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 6, 2026
Audit weighing the cost of keeping the Windows GNU triple in the matrix
against MSVC-only support, in light of the IOCP fast path landing for
the disk-commit thread (#1868). Recommends dropping GNU: CI runs only
cargo check, no release artifact ships GNU, and parity work is large
relative to observed downstream demand.
oferchen added a commit that referenced this pull request May 6, 2026
Audit weighing the cost of keeping the Windows GNU triple in the matrix
against MSVC-only support, in light of the IOCP fast path landing for
the disk-commit thread (#1868). Recommends dropping GNU: CI runs only
cargo check, no release artifact ships GNU, and parity work is large
relative to observed downstream demand.
oferchen added a commit that referenced this pull request May 7, 2026
)

Concise companion to the long-form `windows-gnu-vs-msvc-evaluation.md`:
maps the GNU shim crate, libgcc/libwinpthread bundling, and MinGW
panic-unwind shim against the MSVC-only artefact + CI surface, and
records the recommendation to deprecate `x86_64-pc-windows-gnu` for
one minor release before removal.
oferchen added a commit that referenced this pull request May 7, 2026
…1636) (#3888)

Add design note covering the windows-gnu-eh crate, the
windows-gnu-cross-check CI job, costs vs benefits, and a deprecation
plan that removes the GNU target in v0.8.x after a one-release notice
in v0.7.x.
oferchen added a commit that referenced this pull request May 13, 2026
Survey the windows-gnu-eh shim and CI footprint, recommend dropping
the GNU target in favour of MSVC-only, and document the migration plan
with file:line citations and a three-PR sequence.
oferchen added a commit that referenced this pull request May 18, 2026
Audit weighing the cost of keeping the Windows GNU triple in the matrix
against MSVC-only support, in light of the IOCP fast path landing for
the disk-commit thread (#1868). Recommends dropping GNU: CI runs only
cargo check, no release artifact ships GNU, and parity work is large
relative to observed downstream demand.
oferchen added a commit that referenced this pull request May 18, 2026
)

Concise companion to the long-form `windows-gnu-vs-msvc-evaluation.md`:
maps the GNU shim crate, libgcc/libwinpthread bundling, and MinGW
panic-unwind shim against the MSVC-only artefact + CI surface, and
records the recommendation to deprecate `x86_64-pc-windows-gnu` for
one minor release before removal.
oferchen added a commit that referenced this pull request May 18, 2026
…1636) (#3888)

Add design note covering the windows-gnu-eh crate, the
windows-gnu-cross-check CI job, costs vs benefits, and a deprecation
plan that removes the GNU target in v0.8.x after a one-release notice
in v0.7.x.
oferchen added a commit that referenced this pull request May 18, 2026
Survey the windows-gnu-eh shim and CI footprint, recommend dropping
the GNU target in favour of MSVC-only, and document the migration plan
with file:line citations and a three-PR sequence.
oferchen added a commit that referenced this pull request Aug 24, 2026
Survey the windows-gnu-eh shim and CI footprint, recommend dropping
the GNU target in favour of MSVC-only, and document the migration plan
with file:line citations and a three-PR sequence.
oferchen added a commit that referenced this pull request Aug 24, 2026
Audit weighing the cost of keeping the Windows GNU triple in the matrix
against MSVC-only support, in light of the IOCP fast path landing for
the disk-commit thread (#1868). Recommends dropping GNU: CI runs only
cargo check, no release artifact ships GNU, and parity work is large
relative to observed downstream demand.
oferchen added a commit that referenced this pull request Aug 24, 2026
)

Concise companion to the long-form `windows-gnu-vs-msvc-evaluation.md`:
maps the GNU shim crate, libgcc/libwinpthread bundling, and MinGW
panic-unwind shim against the MSVC-only artefact + CI surface, and
records the recommendation to deprecate `x86_64-pc-windows-gnu` for
one minor release before removal.
oferchen added a commit that referenced this pull request Aug 24, 2026
…1636) (#3888)

Add design note covering the windows-gnu-eh crate, the
windows-gnu-cross-check CI job, costs vs benefits, and a deprecation
plan that removes the GNU target in v0.8.x after a one-release notice
in v0.7.x.
oferchen added a commit that referenced this pull request Aug 24, 2026
Survey the windows-gnu-eh shim and CI footprint, recommend dropping
the GNU target in favour of MSVC-only, and document the migration plan
with file:line citations and a three-PR sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant