Skip to content

meson: Request the linker to error out on unintended autoimported variables

Martin Storsjö requested to merge mstorsjo/dav1d:no-auto-import into master

Technically, there's two related linker options that almost do the same, --disable-auto-import and --disable-runtime-pseudo-reloc. The runtime pseudo relocs is the aspect that don't work if built with -mcmodel=small. (If the linker manages to autoimport variables without using runtime pseudo relocs, as e.g. lld can do in some cases, that would be tolerable, even if we don't expect that to be needed.)

This currently breaks the build with libplacebo enabled though, as pl_vulkan_default_params and pl_render_default_params still are used autoimported. This only exposes the preexisting issue, because if currently built with freshly updated msys2/mingw64, it errors out at runtime with an error like

32 bit pseudo relocation at 00007FF6FF833ABC out of range, targeting 00007FFB753B25C0, yielding the value 0000000475B7EB00.

since https://github.com/mingw-w64/mingw-w64/commit/ca35236d9799af8a3d2f9baa35b60e6c11abeb24.) Thus I wonder how the fix in 31634245 ever worked and/or if it was enough.

Merge request reports

Loading