Skip to content

meson: do not disable incremental linking for debug-builds

Erik Faye-Lund requested to merge kusma/mesa:meson-incremental-linking into master

Meson specifies /EDITANDCONTINUE for MSVC projects when using the debug build-type. This collides with our across-the-board disabling of incremental linking.

It's clear that we don't want to do incremental linking for release-builds; it increase the code-size, and adds some needless jumps to be able to patch in new code. But for debug-builds this seems like a good thing; we can now debug and on-the-fly recompile changes if we want to.

This flag seems to have been simply forwarded from the SCons build system, where it makes a bit more sense; SCons doesn't really integrate with visual studio, so you can't properly debug with it. But Meson does, so let's keep some bells-and-whistles here.

So let's avoid disabling incremental linking for debug-builds. For other builds we still want to do this, because Meson only disables it automatically for minsize-builds.

This avoids a boat-loads of warnings on the form:

warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

Merge request reports