<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/161608>161608</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLD ThinLto Issues with Swift codebase
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chiragramani
</td>
</tr>
</table>
<pre>
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
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"'
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVMmO4zYQ_Rr6UrBA0Vqsgw4a9zgYwLOgPVluBpeSxTRFClym0_n6gLJ7MmkEOUQgIKKKRb5675E8BH21iD2p35H6YcNTnJzv5aQ9v3o-c6s3wqmX_tcJLaSg7RXipC2Y6OBZxwnOz3qMhB3gGSEgAgfp0mIQ3Ain0wNIz8OEoSB0IHQYjHmN5NUWgoORe-AeQVsA0tBh8HJqKvhgQ_RJRu0snNHgOiMNhRD59fuGZ4xpIbs8LQt4l7RRN1y_SacQyqaoIDpn5MS1zTWsgM_WvEAKuOIbnYevk7an6HJ6V8AjLt6pJNEDj5HLCRWhQ1VkcIL_iUaH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