Skip to content

fix(build): preserve macos startup sections with supported linkers - #10709

Closed
BubbleCal wants to merge 1 commit into
mainfrom
yang/macos-arm64-linker-config
Closed

BubbleCal wants to merge 1 commit into
mainfrom
yang/macos-arm64-linker-config

Conversation

@BubbleCal

@BubbleCal BubbleCal commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The repository-wide macOS ARM64 flags rename __text_startup into __text to work around distant constructor calls. Select a linker that can handle those calls while retaining the startup section and constructor registration.

Cargo now uses a small compiler driver launcher for macOS ARM64. SDKs through 26 use Mach-O LLD from the active Rust toolchain; SDK 27 and later use the accompanying Xcode linker because the pinned LLD 22 cannot parse their arm64e.x1 TAPI entries. The launcher preserves SDK/deployment arguments and supports SDKROOT paths outside the active Xcode installation. A separate LLD entry point restores the LLVM library path sanitized by Apple's driver. CPU features, dependency pins and release tags are unchanged.

The existing Python regression now requires both __text_startup and __mod_init_func. CI watches the launcher files, and macOS release-wheel PR jobs force-install the produced wheel and verify its sections. Package upload remains restricted to release events. This does not change the frozen Java beta.9 publisher PR #10687.

Validation for fa9307754e21e5ec8df3cd972a4617547d77e869, including CI merge 95120110d59fa0e1b423f8c5de8dbab332a1c6ac with main 25b3e31b920ad4dcf9ceacf6a5e5e9de0e325b64:

  • macOS ARM64 release wheel: release/strip build with fp16kernels, wheel installation, import and all three section assertions pass. The job uses Rust 1.98.1 and imports the installed wheel with Python 3.13 / PyArrow 26.0.1; package publication is skipped.
  • macOS Python CI: 2,153 tests pass, 481 retain their configured skips, and the startup-section regression explicitly passes.
  • Java CI passes its JNI lint and Java 11/17/21/25 checks. Local current-source macOS JNI validation also passes all 24 Session tests, including complete cache diagnostics, with both sections retained.
  • Local root formatting/strict workspace Clippy and uv run make lint pass. Pyright has 0 errors and existing missing-stub warnings. Focused Python tests pass on the SDK 27 system-linker route; current JNI and the retained LLD evidence cover the older-SDK route.

Actionlint reports the same eight pre-existing composite-action metadata diagnostics on base 9171e1776 and the candidate; no diagnostics are suppressed. These checks establish build and initialization correctness, not a product runtime-performance improvement.

@github-actions github-actions Bot added bug Something isn't working A-python Python bindings A-ci CI / build workflows labels Nov 4, 2026
@BubbleCal BubbleCal closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci CI / build workflows A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant