Swift 5.6 SIL / LLVM Regression

Something at the SIL and LLVM level is broken and generating invalid binaries. The Armv7 situation is worse, a simple hello world program that compiled with 5.5.3 now crashes with bus error. With Swift 5.5.3 I was able to get Swift StdLib, Concurrency, Dispatch and Foundation cross compiling with Linux Buildroot for Armv5 to Armv7 and properly executing on SBCs. Please see the following Swift bugs:

https://bugs.swift.org/browse/SR-16017

Here are the buildroot patches and configs used:

Just change SWIFT_VERSION = 5.5.3 in Swift.mk for SWIFT_VERSION = 5.6 and it will successfully build a Armv7 binary, however this binary crashes both in QEMU and on real hardware.

2 Likes

The issue is only present when compiling with -O or -g