qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Support modules for Windows


From: LIU Zhiwei
Subject: Re: [PATCH] configure: Support modules for Windows
Date: Fri, 5 Nov 2021 20:21:52 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0


On 2021/11/5 下午6:36, Michael Tokarev wrote:
05.11.2021 06:20, LIU Zhiwei wrote:
...
diff --git a/meson.build b/meson.build
index 47df10afc2..26195cb24f 100644
...
@@ -2800,14 +2800,15 @@ common_ss.add(hwcore)
  ###########
  # Targets #
  ###########
-
-foreach m : block_mods + softmmu_mods
-  shared_module(m.name(),
-                name_prefix: '',
-                link_whole: m,
-                install: true,
-                install_dir: qemu_moddir)
-endforeach
+if targetos != 'windows'
+  foreach m : block_mods + softmmu_mods
+    shared_module(m.name(),
+                  name_prefix: '',
+                  link_whole: m,
+                  install: true,
+                  install_dir: qemu_moddir)
+  endforeach
+endif
    softmmu_ss.add(authz, blockdev, chardev, crypto, io, qmp)
  common_ss.add(qom, qemuutil)
@@ -2826,6 +2827,7 @@ common_all = static_library('common',
  feature_to_c = find_program('scripts/feature_to_c.sh')
    emulators = {}
+emulator = 0

mm...
...
It is an executable object that is not  visible in this patch.
@@ -3023,6 +3026,17 @@ foreach target : target_dirs
      endif
    endforeach
  endforeach
+if (targetos == 'windows')
+  foreach m : block_mods + softmmu_mods
+    shared_module(m.name(),
+        name_prefix: '',
+        link_whole: m,
+        install: true,
+        dependencies: glib,
+        link_with: emulator,
+        install_dir: qemu_moddir)
+  endforeach
+endif

Now we have two almost-identical blocks in different places.
Can we either move them closer to each other or combine them into one?

The difference is the next one need to link with an import library which is generated by an executable. If we want to make them closer, I don't know if it influences the build on Linux.

I am not familiar with meson and the right way to implement this feature. Look forward to your more advice.

Thanks,
Zhiwei


Thanks!

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]