From: LIU Zhiwei <zhiwei_liu@c-sky.com>
To: qemu-devel@nongnu.org
Cc: LIU Zhiwei <zhiwei_liu@c-sky.com>
Subject: [PATCH] configure: Support modules for Windows
Date: Fri, 5 Nov 2021 11:19:25 +0800 [thread overview]
Message-ID: <20211105031925.83740-1-zhiwei_liu@c-sky.com> (raw)
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
---
configure | 7 +------
meson.build | 34 ++++++++++++++++++++++++----------
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/configure b/configure
index 33682cb971..6280e412a9 100755
--- a/configure
+++ b/configure
@@ -1422,7 +1422,7 @@ cat << EOF
bsd-user all BSD usermode emulation targets
guest-agent build the QEMU Guest Agent
pie Position Independent Executables
- modules modules support (non-Windows)
+ modules modules support
module-upgrades try to load modules from alternate paths for upgrades
debug-tcg TCG debugging (default is disabled)
debug-info debugging information
@@ -1698,11 +1698,6 @@ else
QEMU_CFLAGS="$QEMU_CFLAGS -Wno-missing-braces"
fi
-# Our module code doesn't support Windows
-if test "$modules" = "yes" && test "$mingw32" = "yes" ; then
- error_exit "Modules are not available for Windows"
-fi
-
# module_upgrades is only reasonable if modules are enabled
if test "$modules" = "no" && test "$module_upgrades" = "yes" ; then
error_exit "Can't enable module-upgrades as Modules are not enabled"
diff --git a/meson.build b/meson.build
index 47df10afc2..26195cb24f 100644
--- a/meson.build
+++ b/meson.build
@@ -2625,7 +2625,7 @@ block_mods = []
softmmu_mods = []
foreach d, list : modules
foreach m, module_ss : list
- if enable_modules and targetos != 'windows'
+ if enable_modules
module_ss = module_ss.apply(config_all, strict: false)
sl = static_library(d + '-' + m, [genh, module_ss.sources()],
dependencies: [modulecommon, module_ss.dependencies()], pic: true)
@@ -2658,7 +2658,7 @@ endforeach
foreach d, list : target_modules
foreach m, module_ss : list
- if enable_modules and targetos != 'windows'
+ if enable_modules
foreach target : target_dirs
if target.endswith('-softmmu')
config_target = config_target_mak[target]
@@ -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
foreach target : target_dirs
config_target = config_target_mak[target]
target_name = config_target['TARGET_NAME']
@@ -2966,6 +2968,7 @@ foreach target : target_dirs
link_language: link_language,
link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []),
link_args: link_args,
+ implib: true,
win_subsystem: exe['win_subsystem'])
if targetos == 'darwin'
@@ -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
# Other build targets
--
2.25.1
next reply other threads:[~2021-11-05 3:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 3:19 LIU Zhiwei [this message]
2021-11-05 3:20 [PATCH] configure: Support modules for Windows LIU Zhiwei
2021-11-05 9:30 ` Daniel P. Berrangé
2021-11-05 12:14 ` LIU Zhiwei
2021-11-05 12:22 ` Daniel P. Berrangé
2021-11-05 12:33 ` LIU Zhiwei
2021-11-05 10:36 ` Michael Tokarev
2021-11-05 12:21 ` LIU Zhiwei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211105031925.83740-1-zhiwei_liu@c-sky.com \
--to=zhiwei_liu@c-sky.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.