Skip to contentSkip to conversation

meson: Fix build with --disable-guest-agent-msi

PATCH Applied Stefan Weil 3 participants 3 messages Nov 17, 2020 – Nov 18, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Fix build with --disable-guest-agent-msi

The QGA MSI target requires several macros which are only available without --disable-guest-agent-msi.

Don't define that target if configure was called with --disable-guest-agent-msi.

---
 qga/meson.build | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)
qga/meson.build +19 -17
index 53ba6de5f8..520af6ce9b 100644
@@ -61,23 +61,25 @@ if targetos == 'windows'
     if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host
       deps += qga_vss
     endif
-    qga_msi = custom_target('QGA MSI',
-                            input: files('installer/qemu-ga.wxs'),
-                            output: 'qemu-ga-@[email protected]'.format(config_host['ARCH']),
-                            depends: deps,
-                            command: [
-                              find_program('env'),
-                              'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
-                              'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
-                              'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
-                              'BUILD_DIR=' + meson.build_root(),
-                              wixl, '-o', '@OUTPUT0@', '@INPUT0@',
-                              config_host['QEMU_GA_MSI_ARCH'].split(),
-                              config_host['QEMU_GA_MSI_WITH_VSS'].split(),
-                              config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
-                            ])
-    all_qga += [qga_msi]
-    alias_target('msi', qga_msi)
+    if 'CONFIG_QGA_MSI' in config_host
+      qga_msi = custom_target('QGA MSI',
+                              input: files('installer/qemu-ga.wxs'),
+                              output: 'qemu-ga-@[email protected]'.format(config_host['ARCH']),
+                              depends: deps,
+                              command: [
+                                find_program('env'),
+                                'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
+                                'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
+                                'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+                                'BUILD_DIR=' + meson.build_root(),
+                                wixl, '-o', '@OUTPUT0@', '@INPUT0@',
+                                config_host['QEMU_GA_MSI_ARCH'].split(),
+                                config_host['QEMU_GA_MSI_WITH_VSS'].split(),
+                                config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
+                              ])
+      all_qga += [qga_msi]
+      alias_target('msi', qga_msi)
+    endif
   endif
 else
   install_subdir('run', install_dir: get_option('localstatedir'))
Signature · 1 line
2.29.2
#1 lore raw
Quoted 48 lines · Stefan Weil

The QGA MSI target requires several macros which are only available without --disable-guest-agent-msi.

Don't define that target if configure was called with --disable-guest-agent-msi.

---
  qga/meson.build | 36 +++++++++++++++++++-----------------
  1 file changed, 19 insertions(+), 17 deletions(-)
qga/meson.build +12 -17
index 53ba6de5f8..520af6ce9b 100644
@@ -61,23 +61,25 @@ if targetos == 'windows'
      if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host
        deps += qga_vss
      endif
-    qga_msi = custom_target('QGA MSI',
-                            input: files('installer/qemu-ga.wxs'),
-                            output: 'qemu-ga-@[email protected]'.format(config_host['ARCH']),
-                            depends: deps,
-                            command: [
-                              find_program('env'),
-                              'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
-                              'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
-                              'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
-                              'BUILD_DIR=' + meson.build_root(),
-                              wixl, '-o', '@OUTPUT0@', '@INPUT0@',
-                              config_host['QEMU_GA_MSI_ARCH'].split(),
-                              config_host['QEMU_GA_MSI_WITH_VSS'].split(),
-                              config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
-                            ])
-    all_qga += [qga_msi]
-    alias_target('msi', qga_msi)
+    if 'CONFIG_QGA_MSI' in config_host
+      qga_msi = custom_target('QGA MSI',
+                              input: files('installer/qemu-ga.wxs'),
+                              output: 'qemu-ga-@[email protected]'.format(config_host['ARCH']),
+                              depends: deps,
+                              command: [
+                                find_program('env'),
+                                'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
+                                'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
+                                'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+                                'BUILD_DIR=' + meson.build_root(),
+                                wixl, '-o', '@OUTPUT0@', '@INPUT0@',

qga/meson.build if targetos == 'windows' · line 85

Quoted 10 lines
qga/meson.build +7 -0
+                                config_host['QEMU_GA_MSI_ARCH'].split(),
+                                config_host['QEMU_GA_MSI_WITH_VSS'].split(),
+                                config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
+                              ])
+      all_qga += [qga_msi]
+      alias_target('msi', qga_msi)
+    endif
    endif
  else
    install_subdir('run', install_dir: get_option('localstatedir'))

Queued, thanks.

Paolo

#2 lore raw
Quoted 6 lines · Paolo Bonzini
Quoted 5 lines · Stefan Weil

The QGA MSI target requires several macros which are only available without --disable-guest-agent-msi.

Don't define that target if configure was called with --disable-guest-agent-msi.

Can we have a CI job to avoid further regressions?

Quoted 73 lines
Quoted 58 lines

---
  qga/meson.build | 36 +++++++++++++++++++-----------------

  1 file changed, 19 insertions(+), 17 deletions(-)
qga/meson.build +0 -0
index 53ba6de5f8..520af6ce9b 100644
@@ -61,23 +61,25 @@ if targetos == 'windows'

      if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host
        deps += qga_vss
      endif
-    qga_msi = custom_target('QGA MSI',
-                            input: files('installer/qemu-ga.wxs'), -                            output:
'qemu-ga-@[email protected]'.format(config_host['ARCH']),
-                            depends: deps,
-                            command: [
-                              find_program('env'),
-                              'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
-                              'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
-                              'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
-                              'BUILD_DIR=' + meson.build_root(), -                              wixl, '-o', '@OUTPUT0@', '@INPUT0@', -                              config_host['QEMU_GA_MSI_ARCH'].split(), -
config_host['QEMU_GA_MSI_WITH_VSS'].split(),
-
config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
-                            ])
-    all_qga += [qga_msi]
-    alias_target('msi', qga_msi)
+    if 'CONFIG_QGA_MSI' in config_host
+      qga_msi = custom_target('QGA MSI',
+                              input: files('installer/qemu-ga.wxs'), +                              output:
'qemu-ga-@[email protected]'.format(config_host['ARCH']),
+                              depends: deps,
+                              command: [
+                                find_program('env'),
+                                'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
+                                'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
+                                'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+                                'BUILD_DIR=' + meson.build_root(), +                                wixl, '-o', '@OUTPUT0@', '@INPUT0@', +                                config_host['QEMU_GA_MSI_ARCH'].split(), +
config_host['QEMU_GA_MSI_WITH_VSS'].split(),
+

Quoted 9 lines

config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
+                              ])
+      all_qga += [qga_msi]
+      alias_target('msi', qga_msi)
+    endif
    endif
  else
    install_subdir('run', install_dir: get_option('localstatedir'))

Queued, thanks.

Paolo