Skip to content

LLD ThinLto Issues with Swift codebase #161608

@chiragramani

Description

@chiragramani

When using thin lto with Swift, we see a couple of LLD crashes.

All crashes seen so far are in AArch64 Instruction Selection stages.

Setup:

  1. Build with Xcode 16.4 toolchain.

  2. Only use LLD for ThinLto.

  3. Reproducer attached rep 2.zip

  4. bazelisk build :Buttons --features=swift.thin_lto --features=thin_lto --features=swift.emit_bc --ios_multi_cpus=arm64

LLVM ERROR: Unsupported stack probing method
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'bazel-out/ios_arm64-fastbuild-ios-arm64-min15.0-applebin_ios-ST-4adaf0076b5c/bin/libNeedleFoundation.a(NonCoreComponent.swift.bc)259720'.
1.      Running pass 'AArch64 Instruction Selection' on function '@"$s16NeedleFoundation16NonCoreComponentC6parentACyxGAA5Scope_p_tcfC"'
LLVM ERROR: Unsupported stack probing method
clang: error: unable to execute command: Abort trap: 6
clang: error: linker command failed due to signal (use -v to see invocation)
Apple clang version 17.0.0 (clang-1700.0.13.5)
Target: arm64-apple-ios15.0
Thread model: posix
InstalledDir: /Applications/Xcode.16.4.0.16F6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTOLink time optimization (regular/full LTO or ThinLTO)backend:AArch64crashPrefer [crash-on-valid] or [crash-on-invalid]llvm:SelectionDAGSelectionDAGISel as wellplatform:macosquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions