Skip to content

swiftPackages.stdlib: disable LTO on aarch64-linux - #583385

Merged
reckenrode merged 1 commit into
NixOS:staging-nextfrom
reckenrode:push-mssmyvzpvzmp
Nov 5, 2026
Merged

reckenrode merged 1 commit into
NixOS:staging-nextfrom
reckenrode:push-mssmyvzpvzmp

Conversation

@reckenrode

Copy link
Copy Markdown
Contributor

Building the Swift stdlib with LTO results in compiler crashes on aarch64-linux. e.g., https://hydra.nixos.org/build/351734944

Fixes Swift compiler crash on staging-next #580394.

Things done

@nixpkgs-ci
nixpkgs-ci Bot requested review from Samasaur1 and stephank November 5, 2026 00:04
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Nov 5, 2026
@reckenrode reckenrode mentioned this pull request Nov 5, 2026
5 of 13 tasks
@mdaniels5757

Copy link
Copy Markdown
Member

npb · b0cafdd → 4c37b35

npb -s x86_64-linux -s aarch64-linux -s aarch64-darwin --base b0cafddb6da84ccdbe4debc8f2779c287bcff9a8 --head b0cafddb6da84ccdbe4debc8f2779c287bcff9a8 --patch b0cafddb6da84ccdbe4debc8f2779c287bcff9a8...4c37b35ecd85b6a6ecfbfbba1c29d78b6120ada5
Expand this for a legend of all symbols below.
  • ✅ = successfully built
  • ❌ = failed to build
  • 🚫 = dependency failed to build
  • ❔ = couldn't try to build
  • ⏩ = failed to evaluate
  • ➖ = doesn't exist

x86_64-linux

No changes.

aarch64-linux

✅ → ✅ · 3 packages
  • swiftPackages.stdlib
  • swiftPackages.swift-syntax
  • swiftPackages.swiftc
🚫 → ✅ · 48 packages (37 unique)
  • age-plugin-se
  • cgtcalc
  • mask
  • open-apple-macros
  • protoc-gen-swift
  • sourcekit-lsp = swiftPackages.sourcekit-lsp
  • swift-format = swiftPackages.swift-format
  • swift.tests.cxx-interop-lld = swiftPackages.swift.tests.cxx-interop-lld
  • swift.tests.cxx-interop = swiftPackages.swift.tests.cxx-interop
  • swift.tests.differentiation = swiftPackages.swift.tests.differentiation
  • swift.tests.foundation-macros = swiftPackages.swift.tests.foundation-macros
  • swift.tests.repl = swiftPackages.swift.tests.repl
  • swift.tests.scripting = swiftPackages.swift.tests.scripting
  • swift.tests.swift-testing = swiftPackages.swift.tests.swift-testing
  • swiftPackages.indexstore-db
  • swiftPackages.swift-argument-parser
  • swiftPackages.swift-asn1
  • swiftPackages.swift-build
  • swiftPackages.swift-certificates
  • swiftPackages.swift-corelibs-foundation
  • swiftPackages.swift-corelibs-xctest
  • swiftPackages.swift-crypto
  • swiftPackages.swift-docc
  • swiftPackages.swift-driver.tests.not-in-toolchain
  • swiftPackages.swift-driver.tests.swift-not-on-path
  • swiftPackages.swift-driver
  • swiftPackages.swift-llbuild
  • swiftPackages.swift-system
  • swiftPackages.swift-testing
  • swiftPackages.swift-tools-protocols
  • swiftPackages.swift-tools-support-core
  • swiftPackages.swiftly
  • swift = swiftPackages.swift
  • swiftformat.tests.format
  • swiftformat
  • swiftpm = swiftPackages.swiftpm
  • unxip
❌ → ✅ · 4 packages (3 unique)
  • swift-corelibs-libdispatch = swiftPackages.swift-corelibs-libdispatch
  • swiftPackages.swift-collections
  • swiftPackages.swift-foundation

aarch64-darwin

No changes.

@mdaniels5757 mdaniels5757 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Diff LGTM otherwise (but I know nothing about Swift)

enableLTO =
# Swift 6.2 is used as a bootstrap compiler. Disable LTO for its stdlib to improve build time.
lib.versions.majorMinor swift_release != "6.2"
# Enable LTO in the stdlib causes `swiftc` to crash in the `MandatoryAllocBoxToStack` on aarch64-linux

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Enable LTO in the stdlib causes `swiftc` to crash in the `MandatoryAllocBoxToStack` on aarch64-linux
# Enabling LTO in the stdlib causes `swiftc` to crash in the `MandatoryAllocBoxToStack` on aarch64-linux

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 5, 2026
@reckenrode
reckenrode enabled auto-merge November 5, 2026 04:25
@reckenrode
reckenrode added this pull request to the merge queue Nov 5, 2026
Merged via the queue into NixOS:staging-next with commit 336e223 Nov 5, 2026
27 checks passed
@reckenrode
reckenrode deleted the push-mssmyvzpvzmp branch November 5, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants