OCaml 4.14.0 rebuild
[arch-packages.git] / qemu / trunk / build-most-modules-statically-hack.diff
blobc845e819777490d3c8abd40bc79f02384d304ae0
1 From: Michael Tokarev <mjt@tls.msk.ru>
2 Subject: build most modules statically (hack)
4 This hack makes the build procedure to build most modules statically,
5 except block and gui modules which goes into their own packages.
6 The rest are built into the executables directly in order to make
7 qemu-system-common package (where all other modules goes) to be
8 more-or-less version-independent.
10 There's little reason to build these as modules or to ship them in
11 separate packages.
13 diff --git a/meson.build b/meson.build
14 index e3386196ba..a28f7d10f1 100644
15 --- a/meson.build
16 +++ b/meson.build
17 @@ -1587,13 +1587,19 @@ softmmu_mods = []
18 foreach d, list : modules
19 foreach m, module_ss : list
20 if enable_modules and targetos != 'windows'
21 - module_ss = module_ss.apply(config_all, strict: false)
22 - sl = static_library(d + '-' + m, [genh, module_ss.sources()],
23 - dependencies: [modulecommon, module_ss.dependencies()], pic: true)
24 + module_dn = module_ss.apply(config_all, strict: false)
25 + sl = static_library(d + '-' + m, [genh, module_dn.sources()],
26 + dependencies: [modulecommon, module_dn.dependencies()], pic: true)
27 if d == 'block'
28 block_mods += sl
29 else
30 - softmmu_mods += sl
31 + # we only build 2 non-block modules as modules: it is the gui part
32 + if d + '-' + m in [ 'ui-gtk', 'ui-sdl', 'audio-pa' ]
33 + softmmu_mods += sl
34 + else
35 + warning('Compiling module statically: ' + d + '-' + m)
36 + softmmu_ss.add_all(module_ss)
37 + endif
38 endif
39 else
40 if d == 'block'