From: Erik Faye-Lund Date: Wed, 15 Apr 2020 18:35:46 +0000 (+0200) Subject: meson: do not disable incremental linking for debug-builds X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6b7439619c55d317bfe05094a9f503d832c9eb7;p=mesa.git meson: do not disable incremental linking for debug-builds 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 Acked-by: Jose Fonseca Acked-by: Dylan Baker Part-of: --- diff --git a/meson.build b/meson.build index 9184b69ea8a..3623d3dc0fd 100644 --- a/meson.build +++ b/meson.build @@ -1030,11 +1030,16 @@ if host_machine.system() == 'windows' if cc.get_id() == 'msvc' add_project_link_arguments( '/fixed:no', - '/incremental:no', '/dynamicbase', '/nxcompat', language : ['c', 'cpp'], ) + if get_option('buildtype') != 'debug' + add_project_link_arguments( + '/incremental:no', + language : ['c', 'cpp'], + ) + endif else add_project_link_arguments( '-Wl,--nxcompat',