Skip to content

Improve cross-compilation tooling autodetection#1889

Merged
oferchen merged 1 commit into
masterfrom
fix-linker-not-found-error
Nov 1, 2025
Merged

Improve cross-compilation tooling autodetection#1889
oferchen merged 1 commit into
masterfrom
fix-linker-not-found-error

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 1, 2025

Summary

  • route the aarch64 linker/ar configuration through the repository shim so build scripts can discover the tools
  • add a shared Zig resolver that can download and cache a compiler when a native cross toolchain is unavailable
  • let the cross shims prefer system toolchains when present and reuse the Zig resolver for the Windows dlltool wrappers

Testing

  • cargo --locked build --release --target aarch64-unknown-linux-gnu --bin oc-rsync

https://chatgpt.com/codex/tasks/task_e_6906401f636c83238d1bd056f5ab6d9b

@oferchen oferchen merged commit ae6bdc2 into master Nov 1, 2025
@oferchen oferchen deleted the fix-linker-not-found-error branch November 1, 2025 17:43
Copy link
Copy Markdown

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

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 +20 to +21
ZIG_BIN=$(resolve_zig_binary "$CROSS_DIR")
exec "$ZIG_BIN" ar -target aarch64-linux-gnu "$@"
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 Remove invalid -target argument in zig ar fallback

When no native aarch64-linux-gnu-ar is found this wrapper now executes zig ar -target aarch64-linux-gnu …. Unlike zig cc, zig ar is just a thin shim over llvm-ar and does not accept -target; the command exits with unknown option: -target, so cross builds will fail on hosts that rely on Zig for the toolchain (which is exactly the scenario this script is meant to support). Dropping the flag or using --target=<triple> is necessary for the fallback path to work.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 16, 2026
Expand the placeholder async migration plan into a comprehensive,
opinionated design covering: current synchronous threading model per
subsystem, per-subsystem cost/benefit, a phased incremental adoption
strategy, tokio runtime choice with rejected alternatives, sync/async
bridge patterns, backward-compat strategy, risk register, and open
questions.

Cross-references existing async-related tasks (#1367, #1411, #1591,
#1593, #1595, #1674, #1751, #1779, #1780, #1782, #1796, #1797, #1805,
#1806, #1889, #1890, #1891, #1892, #1934, #1935, #2136) and related
design notes so future planners have a single anchor.
oferchen added a commit that referenced this pull request May 16, 2026
Expand the placeholder async migration plan into a comprehensive,
opinionated design covering: current synchronous threading model per
subsystem, per-subsystem cost/benefit, a phased incremental adoption
strategy, tokio runtime choice with rejected alternatives, sync/async
bridge patterns, backward-compat strategy, risk register, and open
questions.

Cross-references existing async-related tasks (#1367, #1411, #1591,
#1593, #1595, #1674, #1751, #1779, #1780, #1782, #1796, #1797, #1805,
#1806, #1889, #1890, #1891, #1892, #1934, #1935, #2136) and related
design notes so future planners have a single anchor.
oferchen added a commit that referenced this pull request May 17, 2026
…4226)

Captures the wrapper-level design for swapping the SSH subprocess
stdio onto tokio::process::Child stdio. Records why tokio::process
is preferred over a raw AsyncFd construction, what async actually
buys beyond today's thread-per-half overlap (thread elimination,
collapsed stderr drain and connect watchdog), the parallel
AsyncSshConnection surface, a sync-vs-async bench matrix anchored
on the 1 MB/s emulated link from #1889, and a recommendation to
defer the implementation until the async daemon (#1935) lands so
runtime ownership is settled first.
oferchen added a commit that referenced this pull request May 17, 2026
Adds crates/rsync_io/benches/ssh_sync_vs_async.rs comparing the current
blocking Read+Write SSH transport against a tokio spawn_blocking shim on
a userspace-throttled loopback wire. Sweeps 1 MiB and 16 MiB payloads at
200 ns/byte to simulate a slow link without requiring privileged tc
qdisc netem. The optional ssh-binary smoke cell skips with a clear log
line when ssh is absent on PATH, so CI runners without ssh do not fail.
oferchen added a commit that referenced this pull request May 18, 2026
Expand the placeholder async migration plan into a comprehensive,
opinionated design covering: current synchronous threading model per
subsystem, per-subsystem cost/benefit, a phased incremental adoption
strategy, tokio runtime choice with rejected alternatives, sync/async
bridge patterns, backward-compat strategy, risk register, and open
questions.

Cross-references existing async-related tasks (#1367, #1411, #1591,
#1593, #1595, #1674, #1751, #1779, #1780, #1782, #1796, #1797, #1805,
#1806, #1889, #1890, #1891, #1892, #1934, #1935, #2136) and related
design notes so future planners have a single anchor.
oferchen added a commit that referenced this pull request May 18, 2026
…4226)

Captures the wrapper-level design for swapping the SSH subprocess
stdio onto tokio::process::Child stdio. Records why tokio::process
is preferred over a raw AsyncFd construction, what async actually
buys beyond today's thread-per-half overlap (thread elimination,
collapsed stderr drain and connect watchdog), the parallel
AsyncSshConnection surface, a sync-vs-async bench matrix anchored
on the 1 MB/s emulated link from #1889, and a recommendation to
defer the implementation until the async daemon (#1935) lands so
runtime ownership is settled first.
oferchen added a commit that referenced this pull request May 18, 2026
Adds crates/rsync_io/benches/ssh_sync_vs_async.rs comparing the current
blocking Read+Write SSH transport against a tokio spawn_blocking shim on
a userspace-throttled loopback wire. Sweeps 1 MiB and 16 MiB payloads at
200 ns/byte to simulate a slow link without requiring privileged tc
qdisc netem. The optional ssh-binary smoke cell skips with a clear log
line when ssh is absent on PATH, so CI runners without ssh do not fail.
oferchen added a commit that referenced this pull request May 18, 2026
Expand the placeholder async migration plan into a comprehensive,
opinionated design covering: current synchronous threading model per
subsystem, per-subsystem cost/benefit, a phased incremental adoption
strategy, tokio runtime choice with rejected alternatives, sync/async
bridge patterns, backward-compat strategy, risk register, and open
questions.

Cross-references existing async-related tasks (#1367, #1411, #1591,
#1593, #1595, #1674, #1751, #1779, #1780, #1782, #1796, #1797, #1805,
#1806, #1889, #1890, #1891, #1892, #1934, #1935, #2136) and related
design notes so future planners have a single anchor.
oferchen added a commit that referenced this pull request May 18, 2026
…4226)

Captures the wrapper-level design for swapping the SSH subprocess
stdio onto tokio::process::Child stdio. Records why tokio::process
is preferred over a raw AsyncFd construction, what async actually
buys beyond today's thread-per-half overlap (thread elimination,
collapsed stderr drain and connect watchdog), the parallel
AsyncSshConnection surface, a sync-vs-async bench matrix anchored
on the 1 MB/s emulated link from #1889, and a recommendation to
defer the implementation until the async daemon (#1935) lands so
runtime ownership is settled first.
oferchen added a commit that referenced this pull request May 18, 2026
Adds crates/rsync_io/benches/ssh_sync_vs_async.rs comparing the current
blocking Read+Write SSH transport against a tokio spawn_blocking shim on
a userspace-throttled loopback wire. Sweeps 1 MiB and 16 MiB payloads at
200 ns/byte to simulate a slow link without requiring privileged tc
qdisc netem. The optional ssh-binary smoke cell skips with a clear log
line when ssh is absent on PATH, so CI runners without ssh do not fail.
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