I would very much like SIL declarations to carry their defining module (for shared modules, this would be the current module, i.e. it might change after deserialization/linking). I think that, if you had that, you would be able to derive a defining module from an arbitrary LinkEntity
; if that module is a native Swift
module (as opposed to e.g. an imported C module), I don't see why it shouldn't carry information like whether it was built with -static
. But we'd need that first step, and we don't have it right now.
1 Like