Skip to content

[dotnet] Stop using ld_classic with Xcode 27. Fixes #25676 - #26639

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/fix-issue-25676
Open

rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/fix-issue-25676

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Xcode 27 removed the classic linker and rejects the -ld_classic option.

Prevent both regular and NativeAOT linking from forwarding the option when using Xcode 27 or newer, while preserving the existing behavior with older Xcode versions.

Fixes #25676

🤖 Pull request created by Copilot

Xcode 27 removed the classic linker and rejects -ld_classic. Prevent both regular and NativeAOT linking from forwarding the option when using Xcode 27 or newer.\n\nFixes #25676\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 16, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Explicit overrides can still forward the removed linker option, and regression tests are needed.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates linker handling to stop forwarding -ld_classic with Xcode 27+, while preserving older-Xcode behavior.

Changes:

  • Gates NativeAOT and regular linker handling by Xcode version.
  • Retains classic linker behavior for older Xcode versions.
  • Requires an unconditional override fix and regression coverage.
File summaries
File Summary
dotnet/targets/Xamarin.Shared.Sdk.targets Applies Xcode-version checks to linker configuration; explicit true overrides can still pass -ld_classic on Xcode 27+, and tests are missing.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread dotnet/targets/Xamarin.Shared.Sdk.targets
Comment thread dotnet/targets/Xamarin.Shared.Sdk.targets
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: fc942d5bb18ebfcbc85829aded8408736be62833 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #fc942d5] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 1 tests failed, 263 tests passed.

Failures

❌ monotouch tests (iOS) [attempt 2]

1 tests failed, 24 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Debug (managed static registrar): TimedOut

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 25 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
⚠️ Tests on macOS Golden Gate (27): Tests skipped, incorrect beta version. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: fc942d5bb18ebfcbc85829aded8408736be62833 [PR build]

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.

Stop supporting -ld_classic

3 participants