The current default has subtly different behavior from swift build
. Specifically, if the C library has missing extern
definitions, the build fails on a missing symbol in Xcode, but succeeds with swift build
.
Missing extern
definitions are valid C. My project, Opaque, defines an extern
symbol in a C target which the dependent target implements using @_cdecl
. This allows me to implement that symbol using the Swift standard library.
I'm tempted to call this a bug, but I was wondering if anyone could imagine a situation changing this default would break existing projects.