[swift-dev] swift (ABI) and Windows

Paul Menage paul at paulmenage.org
Fri Oct 7 15:58:30 CDT 2016

On Wed, May 11, 2016 at 9:23 AM, Saleem Abdulrasool via swift-dev
<swift-dev at swift.org> wrote:
> Unfortunately, ATM, the runtime is compacted into the stdlib, which has the
> small problem of making the stdlib have references to the runtime functions
> as if it were being dynamically linked.  We *could* just assume that the any
> time that the LLVM module name is "Swift.*" we are building the stdlib and
> not mark the runtime functions for external (import) dll storage, but this
> seems rather fragile.  The problem is that at IRGen time, we no longer have
> access to  the SILModule (AFAIK), so we don't have a way to identify if we
> are the stdlib or not.  Suggestions on how to handle that would be
> appreciated.

Experimenting with building for Windows-arm with MSVC, this approach
does work pretty well. But it seems hacky. Can we use
llvm::Module::addModuleFlag() to add a "SwiftStdlib" flag to the
module that the IRGenCode can check for?


More information about the swift-dev mailing list