diff options
author | Erik Faye-Lund <[email protected]> | 2020-04-15 20:35:46 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-20 12:25:42 +0000 |
commit | d6b7439619c55d317bfe05094a9f503d832c9eb7 (patch) | |
tree | bcf0cd57bebf6a520f51ea6cae632a47ffa80025 | |
parent | ed29b24e233a332799eed006f71540ac4c56c5ee (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 <[email protected]>
Acked-by: Dylan Baker <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4572>
-rw-r--r-- | meson.build | 7 |
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', |