Whats the right way to build windows delayed libraries using meson? #15037
Replies: 3 comments 1 reply
|
There's no explicit support for it. I guess the best way would be to define a At a technical level, delayload is "just" a kind of post-processor for libraries that builds an alternative implib, whose function stubs are all wrappers around LoadLibrary and GetProcAddress. So, equivalent to a kind of magic linux tool that runs nm on a library, then generates a static library with excessive use of dlopen that implements each function reported by nm, as a dlsym jump to the real function. So there's no real reason that it has to be hooked into the library creation itself, and you don't need to overwrite the original implib. It is really just a freestanding secondary artifact to create. A custom_target will work quite fine for that. |
|
Here is an example from QEMU: https://github.com/qemu/qemu/blob/master/plugins/meson.build. Creating the delaylib with |
Uh oh!
There was an error while loading. Please reload this page.
The windows system allow usage of "delayed libraries" allowing better control for loading libraryes, on a normal makefile you can do that using dlltoool --input-def filename.def --dllname filename.dll --kill-at --output-delaylib filename.delayed.a
I'm wondering what's the best way to get the same result using meson.
All reactions