Commit graph

3 commits

Author SHA1 Message Date
Martin Kinkelin
7b6810b01b Fix LLVM 13 deprecation messages during build 2022-02-26 19:15:46 +01:00
Martin Kinkelin
67d3d872aa Fix dllimport relocation pass wrt. multiple definitions
This fixes segfaults when running the shared Phobos test runners; it
previously tried to fix up fields of constant data.
2021-05-03 16:44:41 +02:00
Martin Kinkelin
8acdcb43eb Add manual dllimport 'relocation' pass for static data initializers
References to dllimported globals in static data initializers lead to
undefined-symbol linker errors. We need to resolve the indirection
manually at runtime.

I went with an extra LLVM pass for Windows targets when using
`-fvisibility=public`, and scanning the initializers of all global
variables (well, only thread-global ones). The problematic pointers in
the initializers are nullified and initialized at runtime early via a
CRT constructor (working with -betterC as well).
2021-04-30 17:11:55 +02:00