[PATCH] meson: build macOS signed binary as part of the default target

Emmanuel Blot posted 1 patch 12 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260609-macos-default-signed-bin-v1-1-e013ccb5ccb7@meta.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
meson.build | 1 +
1 file changed, 1 insertion(+)
[PATCH] meson: build macOS signed binary as part of the default target
Posted by Emmanuel Blot 12 hours ago
Signed-off-by: Emmanuel Blot <eblot@meta.com>
---
Toolchain on macOS hosts generates unsigned binaries, named with a
`-unsigned` suffix.

The default target does not generate a signed version.

This patch adds the custom target that generates the signed version to
the build by default target list, only for macOS hosts.
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index 19e123423b..e026851309 100644
--- a/meson.build
+++ b/meson.build
@@ -4453,6 +4453,7 @@ foreach target : target_dirs
       emulators += {exe['name'] : custom_target(exe['name'],
                    input: build_input,
                    output: exe['name'],
+                   build_by_default: true,
                    command: [entitlement, '@OUTPUT@', '@INPUT@'])
       }
 

---
base-commit: cc329c491768b2d91eb0b0984f3baa0bf805776d
change-id: 20260609-macos-default-signed-bin-a75612cf7a85

Best regards,
--  
Emmanuel Blot <eblot@meta.com>
Re: [PATCH] meson: build macOS signed binary as part of the default target
Posted by Pierrick Bouvier 6 hours ago
On 6/9/2026 2:13 AM, Emmanuel Blot wrote:
> Signed-off-by: Emmanuel Blot <eblot@meta.com>
> ---
> Toolchain on macOS hosts generates unsigned binaries, named with a
> `-unsigned` suffix.
> 
> The default target does not generate a signed version.
> 
> This patch adds the custom target that generates the signed version to
> the build by default target list, only for macOS hosts.
> ---
>  meson.build | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meson.build b/meson.build
> index 19e123423b..e026851309 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -4453,6 +4453,7 @@ foreach target : target_dirs
>        emulators += {exe['name'] : custom_target(exe['name'],
>                     input: build_input,
>                     output: exe['name'],
> +                   build_by_default: true,
>                     command: [entitlement, '@OUTPUT@', '@INPUT@'])
>        }
>  
> 
> ---
> base-commit: cc329c491768b2d91eb0b0984f3baa0bf805776d
> change-id: 20260609-macos-default-signed-bin-a75612cf7a85
> 
> Best regards,
> --  
> Emmanuel Blot <eblot@meta.com>
> 

Congrats on finding this one! That's the right fix.

I looked around this area and totally missed the fact it was a
custom_target instead of an executable, and since it's never used as a
dependency, it has no reason to be built by default.

Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Regards,
Pierrick