diff mbox series

[RFC] meson.build: don't bother with split-debug for windows

Message ID 20250314102307.2806696-1-alex.bennee@linaro.org
State New
Headers show
Series [RFC] meson.build: don't bother with split-debug for windows | expand

Commit Message

Alex Bennée March 14, 2025, 10:23 a.m. UTC
It was reported this breaks the final artefacts on windows when run
under Wine.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Konstantin Kostiuk <kkostiuk@redhat.com>
---
 meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Konstantin Kostiuk March 14, 2025, 10:41 a.m. UTC | #1
Best Regards,
Konstantin Kostiuk.


On Fri, Mar 14, 2025 at 12:23 PM Alex Bennée <alex.bennee@linaro.org> wrote:

> It was reported this breaks the final artefacts on windows when run
> under Wine.
>

Not only Wine, but Windows as well. Tested on Windows Server 2022.


>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Konstantin Kostiuk <kkostiuk@redhat.com>
> ---
>  meson.build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index c2c71b6f8a..9b1af6d030 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -601,8 +601,10 @@ if get_option('tsan')
>    qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags
>  endif
>
> -if get_option('debug') and get_option('split_debug')
> -  qemu_cflags += '-gsplit-dwarf'
> +if host_os != 'windows'
> +  if get_option('debug') and get_option('split_debug')
> +    qemu_cflags += '-gsplit-dwarf'
> +  endif
>  endif
>
>  # Detect support for PT_GNU_RELRO + DT_BIND_NOW.
> --
> 2.39.5
>
>
Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Peter Maydell March 14, 2025, 10:47 a.m. UTC | #2
On Fri, 14 Mar 2025 at 10:23, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> It was reported this breaks the final artefacts on windows when run
> under Wine.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Konstantin Kostiuk <kkostiuk@redhat.com>
> ---
>  meson.build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index c2c71b6f8a..9b1af6d030 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -601,8 +601,10 @@ if get_option('tsan')
>    qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags
>  endif
>
> -if get_option('debug') and get_option('split_debug')
> -  qemu_cflags += '-gsplit-dwarf'
> +if host_os != 'windows'
> +  if get_option('debug') and get_option('split_debug')
> +    qemu_cflags += '-gsplit-dwarf'
> +  endif
>  endif

Can we have a comment saying why we need to special case
Windows, please, preferably one with a URL to a bug report
about the compiler problem or to where it's documented that
this option isn't intended to work for Windows ?

thanks
-- PMM
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index c2c71b6f8a..9b1af6d030 100644
--- a/meson.build
+++ b/meson.build
@@ -601,8 +601,10 @@  if get_option('tsan')
   qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags
 endif
 
-if get_option('debug') and get_option('split_debug')
-  qemu_cflags += '-gsplit-dwarf'
+if host_os != 'windows'
+  if get_option('debug') and get_option('split_debug')
+    qemu_cflags += '-gsplit-dwarf'
+  endif
 endif
 
 # Detect support for PT_GNU_RELRO + DT_BIND_NOW.