Unable to build image using embedded swift with WiFi - C compiler being invoked?

To resolve

undefined reference to `_swift_exceptionPersonality'

you need to tell Clang to disable exceptions support for the C++ code (which is likely what you want anyway, most embedded platforms don't want the relatively heavyweight unwinding runtime that is needed for C++ exceptions to work...):

        -Xcc -fno-exceptions
        -Xcc -fno-rtti

These are also in the sample setup in https://github.com/apple/swift-matter-examples/blob/main/empty-template/main/CMakeLists.txt#L32.