summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-04-15 20:35:46 +0200
committerMarge Bot <eric+marge@anholt.net>2020-04-20 12:25:42 +0000
commitd6b7439619c55d317bfe05094a9f503d832c9eb7 (patch)
treebcf0cd57bebf6a520f51ea6cae632a47ffa80025 /meson.build
parented29b24e233a332799eed006f71540ac4c56c5ee (diff)
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 <jfonseca@vmware.com> Acked-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4572>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 6 insertions, 1 deletions
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',