Skip to contentSkip to conversation

meson: Move the creation of the library to the main meson.build

PATCH Superseded Philippe Mathieu-Daudé 2 participants 18 messages Oct 6, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover meson: Move the creation of the library to the main meson.build

Make Meson machinery more consistent, as requested by Paolo.

Philippe Mathieu-Daudé (10):
migration: Only add migration files to the Meson sourceset meson.build: Add comments to clarify code organization meson.build: Sort sourcesets alphabetically
hw/core: Move the creation of the library to the main meson.build
chardev: Move the creation of the library to the main meson.build
migration: Move the creation of the library to the main meson.build
io: Move the creation of the library to the main meson.build
crypto: Move the creation of the library to the main meson.build
authz: Move the creation of the library to the main meson.build
qom: Move the creation of the library to the main meson.build

 meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----
 authz/meson.build     | 10 -----
 chardev/meson.build   |  6 ---
 crypto/meson.build    | 10 -----
 hw/core/meson.build   |  6 ---
 io/meson.build        | 10 -----
 migration/meson.build |  8 +---
 qom/meson.build       |  8 ----
 8 files changed, 77 insertions(+), 67 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

RFC PATCH 1/10 migration: Only add migration files to the Meson sourceset

I'm not sure how that works, but keep the use of Meson sourcesets consistent, only add source files.

---
 migration/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +1 -1
index b5b71c8060..55c9e1329f 100644
@@ -14,7 +14,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
                               build_by_default: false)
 migration = declare_dependency(link_with: libmigration,
                                dependencies: [zlib, qom, io])
-softmmu_ss.add(migration)
+softmmu_ss.add(migration_files)
 
 softmmu_ss.add(files(
   'block-dirty-bitmap.c',
Signature · 1 line
2.26.2
#2 lore raw

Re: [RFC PATCH 01/10] migration: Only add migration files to the Meson sourceset

Quoted 4 lines · Philippe Mathieu-Daudé

I'm not sure how that works, but keep the use of Meson sourcesets consistent, only add source files.

Eventually:

Fixes 5516623020 ("meson: convert migration directory to Meson")
Quoted 21 lines
---
 migration/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +1 -2
index b5b71c8060..55c9e1329f 100644
@@ -14,7 +14,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
                               build_by_default: false)
 migration = declare_dependency(link_with: libmigration,
                                dependencies: [zlib, qom, io])
-softmmu_ss.add(migration)
+softmmu_ss.add(migration_files)
 
 softmmu_ss.add(files(
   'block-dirty-bitmap.c',
--

2.26.2

#3 lore raw

Re: [RFC PATCH 01/10] migration: Only add migration files to the Meson sourceset

In reply to Philippe Mathieu-Daudé
Quoted 13 lines · Philippe Mathieu-Daudé

I'm not sure how that works, but keep the use of Meson sourcesets consistent, only add source files.

---
 migration/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +0 -0
index b5b71c8060..55c9e1329f 100644

migration/meson.build libmigration = static_library('migration', sources: migration_files + genh, · line 17

Quoted 5 lines
migration/meson.build +1 -1
@@ -14,7 +14,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
                               build_by_default: false)
 migration = declare_dependency(link_with: libmigration,
                                dependencies: [zlib, qom, io])
-softmmu_ss.add(migration)
+softmmu_ss.add(migration_files)

This would compile the file twice. You can just drop this change and fixup patch 6 instead.

Paolo

#4 lore raw

PATCH 2/10 meson.build: Add comments to clarify code organization

In reply to Philippe Mathieu-Daudé
---
 meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
meson.build +8 -0
index a02c743794..eaff16d482 100644
@@ -1323,6 +1323,10 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
                              capture: true,
                              command: [undefsym, nm, '@INPUT@'])
 
+########################
+# Library dependencies #
+########################
+
 block_ss = block_ss.apply(config_host, strict: false)
 libblock = static_library('block', block_ss.sources() + genh,
                           dependencies: block_ss.dependencies(),
@@ -1363,6 +1367,10 @@ common_all = static_library('common',
                             dependencies: common_all.dependencies(),
                             name_suffix: 'fa')
 
+###########
+# Targets #
+###########
+
 feature_to_c = find_program('scripts/feature_to_c.sh')
 
 emulators = {}
Signature · 1 line
2.26.2
#5 lore raw

Re: [PATCH 02/10] meson.build: Add comments to clarify code organization

Quoted 22 lines · Philippe Mathieu-Daudé
---
 meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
meson.build +4 -0
index a02c743794..eaff16d482 100644
@@ -1323,6 +1323,10 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
                              capture: true,
                              command: [undefsym, nm, '@INPUT@'])
 
+########################
+# Library dependencies #
+########################
+
 block_ss = block_ss.apply(config_host, strict: false)
 libblock = static_library('block', block_ss.sources() + genh,
                           dependencies: block_ss.dependencies(),

meson.build common_all = static_library('common', · line 1376

Quoted 10 lines
meson.build +4 -0
@@ -1363,6 +1367,10 @@ common_all = static_library('common',
                             dependencies: common_all.dependencies(),
                             name_suffix: 'fa')
 
+###########
+# Targets #
+###########
+
 feature_to_c = find_program('scripts/feature_to_c.sh')
 
 emulators = {}

Much appreciated. :)

Paolo

#6 lore raw

PATCH 3/10 meson.build: Sort sourcesets alphabetically

In reply to Philippe Mathieu-Daudé
---
 meson.build | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
meson.build +10 -10
index eaff16d482..fc7792b769 100644
@@ -1059,19 +1059,19 @@ sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
 
 # Collect sourcesets.
 
-util_ss = ss.source_set()
+blockdev_ss = ss.source_set()
+block_ss = ss.source_set()
+bsd_user_ss = ss.source_set()
+common_ss = ss.source_set()
+linux_user_ss = ss.source_set()
+qmp_ss = ss.source_set()
+softmmu_ss = ss.source_set()
+specific_fuzz_ss = ss.source_set()
+specific_ss = ss.source_set()
 stub_ss = ss.source_set()
 trace_ss = ss.source_set()
-block_ss = ss.source_set()
-blockdev_ss = ss.source_set()
-qmp_ss = ss.source_set()
-common_ss = ss.source_set()
-softmmu_ss = ss.source_set()
 user_ss = ss.source_set()
-bsd_user_ss = ss.source_set()
-linux_user_ss = ss.source_set()
-specific_ss = ss.source_set()
-specific_fuzz_ss = ss.source_set()
+util_ss = ss.source_set()
 
 modules = {}
 hw_arch = {}
Signature · 1 line
2.26.2
#7 lore raw

PATCH 4/10 hw/core: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build         | 7 +++++++
 hw/core/meson.build | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)
meson.build +7 -0
index fc7792b769..ccfa3e9531 100644
@@ -1346,6 +1346,13 @@ libqmp = static_library('qmp', qmp_ss.sources() + genh,
 
 qmp = declare_dependency(link_whole: [libqmp])
 
+libhwcore = static_library('hwcore', sources: hwcore_files + genh,
+                           name_suffix: 'fa',
+                           build_by_default: false)
+hwcore = declare_dependency(link_whole: libhwcore)
+common_ss.add(hwcore)
+
+
 foreach m : block_mods + softmmu_mods
   shared_module(m.name(),
                 name_prefix: '',
hw/core/meson.build +0 -6
index fc91f98075..4a744f3b5e 100644
@@ -14,12 +14,6 @@ hwcore_files = files(
   'qdev-clock.c',
 )
 
-libhwcore = static_library('hwcore', sources: hwcore_files + genh,
-                           name_suffix: 'fa',
-                           build_by_default: false)
-hwcore = declare_dependency(link_whole: libhwcore)
-common_ss.add(hwcore)
-
 common_ss.add(files('cpu.c'))
 common_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
 common_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c'))
Signature · 1 line
2.26.2
#8 lore raw

PATCH 5/10 chardev: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build         | 7 +++++++
 chardev/meson.build | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)
meson.build +7 -0
index ccfa3e9531..6bec7a0994 100644
@@ -1062,6 +1062,7 @@ sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
 blockdev_ss = ss.source_set()
 block_ss = ss.source_set()
 bsd_user_ss = ss.source_set()
+chardev_ss = ss.source_set()
 common_ss = ss.source_set()
 linux_user_ss = ss.source_set()
 qmp_ss = ss.source_set()
@@ -1346,6 +1347,12 @@ libqmp = static_library('qmp', qmp_ss.sources() + genh,
 
 qmp = declare_dependency(link_whole: [libqmp])
 
+libchardev = static_library('chardev', chardev_ss.sources() + genh,
+                            name_suffix: 'fa',
+                            build_by_default: false)
+
+chardev = declare_dependency(link_whole: libchardev)
+
 libhwcore = static_library('hwcore', sources: hwcore_files + genh,
                            name_suffix: 'fa',
                            build_by_default: false)
chardev/meson.build +0 -6
index 54e88d0310..dd2699a11b 100644
@@ -1,4 +1,3 @@
-chardev_ss = ss.source_set()
 chardev_ss.add(files(
   'char-fe.c',
   'char-file.c',
@@ -25,11 +24,6 @@ chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(
 ))
 
 chardev_ss = chardev_ss.apply(config_host, strict: false)
-libchardev = static_library('chardev', chardev_ss.sources() + genh,
-                            name_suffix: 'fa',
-                            build_by_default: false)
-
-chardev = declare_dependency(link_whole: libchardev)
 
 softmmu_ss.add(files('chardev-sysemu.c', 'msmouse.c', 'wctablet.c', 'testdev.c'))
 softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
Signature · 1 line
2.26.2
#9 lore raw

PATCH 6/10 migration: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build           | 6 ++++++
 migration/meson.build | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
meson.build +6 -0
index 6bec7a0994..55966c3b60 100644
@@ -1328,6 +1328,12 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+libmigration = static_library('migration', sources: migration_files + genh,
+                              name_suffix: 'fa',
+                              build_by_default: false)
+migration = declare_dependency(link_with: libmigration,
+                               dependencies: [zlib, qom, io])
+
 block_ss = block_ss.apply(config_host, strict: false)
 libblock = static_library('block', block_ss.sources() + genh,
                           dependencies: block_ss.dependencies(),
migration/meson.build +0 -6
index 55c9e1329f..980e37865c 100644
@@ -8,12 +8,6 @@ migration_files = files(
   'qemu-file.c',
   'qjson.c',
 )
-
-libmigration = static_library('migration', sources: migration_files + genh,
-                              name_suffix: 'fa',
-                              build_by_default: false)
-migration = declare_dependency(link_with: libmigration,
-                               dependencies: [zlib, qom, io])
 softmmu_ss.add(migration_files)
 
 softmmu_ss.add(files(
Signature · 1 line
2.26.2
#10 lore raw

Re: [PATCH 06/10] migration: Move the creation of the library to the main meson.build

Quoted 34 lines · Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build           | 6 ++++++
 migration/meson.build | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
meson.build +6 -0
index 6bec7a0994..55966c3b60 100644
@@ -1328,6 +1328,12 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+libmigration = static_library('migration', sources: migration_files + genh,
+                              name_suffix: 'fa',
+                              build_by_default: false)
+migration = declare_dependency(link_with: libmigration,
+                               dependencies: [zlib, qom, io])
+
 block_ss = block_ss.apply(config_host, strict: false)
 libblock = static_library('block', block_ss.sources() + genh,
                           dependencies: block_ss.dependencies(),
migration/meson.build +0 -0
index 55c9e1329f..980e37865c 100644
@@ -8,12 +8,6 @@ migration_files = files(
   'qemu-file.c',
   'qjson.c',

migration/meson.build migration_files = files( · line 13

Quoted 10 lines
migration/meson.build +0 -6
 )
-
-libmigration = static_library('migration', sources: migration_files + genh,
-                              name_suffix: 'fa',
-                              build_by_default: false)
-migration = declare_dependency(link_with: libmigration,
-                               dependencies: [zlib, qom, io])
 softmmu_ss.add(migration_files)
 
 softmmu_ss.add(files(

You can move add softmmu_ss.add(migration) to the toplevel meson.build too, together with the other dependencies.

Paolo

#11 lore raw

Re: [PATCH 06/10] migration: Move the creation of the library to the main meson.build

Quoted 43 lines · Paolo Bonzini
Quoted 42 lines · Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build           | 6 ++++++
 migration/meson.build | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
meson.build +6 -0
index 6bec7a0994..55966c3b60 100644
@@ -1328,6 +1328,12 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+libmigration = static_library('migration', sources: migration_files + genh,
+                              name_suffix: 'fa',
+                              build_by_default: false)
+migration = declare_dependency(link_with: libmigration,
+                               dependencies: [zlib, qom, io])
+
 block_ss = block_ss.apply(config_host, strict: false)
 libblock = static_library('block', block_ss.sources() + genh,
                           dependencies: block_ss.dependencies(),
migration/meson.build +0 -6
index 55c9e1329f..980e37865c 100644
@@ -8,12 +8,6 @@ migration_files = files(
   'qemu-file.c',
   'qjson.c',
 )
-
-libmigration = static_library('migration', sources: migration_files + genh,
-                              name_suffix: 'fa',
-                              build_by_default: false)
-migration = declare_dependency(link_with: libmigration,
-                               dependencies: [zlib, qom, io])
 softmmu_ss.add(migration_files)
 
Quoted 5 lines

migration/meson.build migration_files = files( · line 13

Quoted 2 lines
migration/meson.build +0 -0
 softmmu_ss.add(files(

You can move add softmmu_ss.add(migration) to the toplevel meson.build too, together with the other dependencies.

Ah OK now I understand slightly better.

Quoted 3 lines

Paolo

#12 lore raw

PATCH 7/10 io: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build    | 10 ++++++++++
 io/meson.build | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
meson.build +10 -0
index 55966c3b60..70545efd74 100644
@@ -1064,6 +1064,7 @@ block_ss = ss.source_set()
 bsd_user_ss = ss.source_set()
 chardev_ss = ss.source_set()
 common_ss = ss.source_set()
+io_ss = ss.source_set()
 linux_user_ss = ss.source_set()
 qmp_ss = ss.source_set()
 softmmu_ss = ss.source_set()
@@ -1328,6 +1329,15 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+io_ss = io_ss.apply(config_host, strict: false)
+libio = static_library('io', io_ss.sources() + genh,
+                       dependencies: [io_ss.dependencies()],
+                       link_with: libqemuutil,
+                       name_suffix: 'fa',
+                       build_by_default: false)
+
+io = declare_dependency(link_whole: libio, dependencies: [crypto, qom])
+
 libmigration = static_library('migration', sources: migration_files + genh,
                               name_suffix: 'fa',
                               build_by_default: false)
io/meson.build +0 -10
index 768c1b5ec3..bcd8b1e737 100644
@@ -1,4 +1,3 @@
-io_ss = ss.source_set()
 io_ss.add(genh)
 io_ss.add(files(
   'channel-buffer.c',
@@ -14,12 +13,3 @@ io_ss.add(files(
   'net-listener.c',
   'task.c',
 ))
-
-io_ss = io_ss.apply(config_host, strict: false)
-libio = static_library('io', io_ss.sources() + genh,
-                       dependencies: [io_ss.dependencies()],
-                       link_with: libqemuutil,
-                       name_suffix: 'fa',
-                       build_by_default: false)
-
-io = declare_dependency(link_whole: libio, dependencies: [crypto, qom])
Signature · 1 line
2.26.2
#13 lore raw

PATCH 8/10 crypto: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build        | 10 ++++++++++
 crypto/meson.build | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
meson.build +10 -0
index 70545efd74..5ded67cb76 100644
@@ -1064,6 +1064,7 @@ block_ss = ss.source_set()
 bsd_user_ss = ss.source_set()
 chardev_ss = ss.source_set()
 common_ss = ss.source_set()
+crypto_ss = ss.source_set()
 io_ss = ss.source_set()
 linux_user_ss = ss.source_set()
 qmp_ss = ss.source_set()
@@ -1329,6 +1330,15 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+crypto_ss = crypto_ss.apply(config_host, strict: false)
+libcrypto = static_library('crypto', crypto_ss.sources() + genh,
+                           dependencies: [crypto_ss.dependencies()],
+                           name_suffix: 'fa',
+                           build_by_default: false)
+
+crypto = declare_dependency(link_whole: libcrypto,
+                            dependencies: [authz, qom])
+
 io_ss = io_ss.apply(config_host, strict: false)
 libio = static_library('io', io_ss.sources() + genh,
                        dependencies: [io_ss.dependencies()],
crypto/meson.build +0 -10
index f6f5ce1ecd..7f37b5d335 100644
@@ -1,4 +1,3 @@
-crypto_ss = ss.source_set()
 crypto_ss.add(genh)
 crypto_ss.add(files(
   'afsplit.c',
@@ -52,15 +51,6 @@ if 'CONFIG_GNUTLS' in config_host
 endif
 
 
-crypto_ss = crypto_ss.apply(config_host, strict: false)
-libcrypto = static_library('crypto', crypto_ss.sources() + genh,
-                           dependencies: [crypto_ss.dependencies()],
-                           name_suffix: 'fa',
-                           build_by_default: false)
-
-crypto = declare_dependency(link_whole: libcrypto,
-                            dependencies: [authz, qom])
-
 util_ss.add(files('aes.c'))
 util_ss.add(files('init.c'))
 
Signature · 1 line
2.26.2
#14 lore raw

PATCH 9/10 authz: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build       | 10 ++++++++++
 authz/meson.build | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
meson.build +10 -0
index 5ded67cb76..9ecfe93503 100644
@@ -1059,6 +1059,7 @@ sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
 
 # Collect sourcesets.
 
+authz_ss = ss.source_set()
 blockdev_ss = ss.source_set()
 block_ss = ss.source_set()
 bsd_user_ss = ss.source_set()
@@ -1330,6 +1331,15 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+authz_ss = authz_ss.apply(config_host, strict: false)
+libauthz = static_library('authz', authz_ss.sources() + genh,
+                          dependencies: [authz_ss.dependencies()],
+                          name_suffix: 'fa',
+                          build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz,
+                           dependencies: qom)
+
 crypto_ss = crypto_ss.apply(config_host, strict: false)
 libcrypto = static_library('crypto', crypto_ss.sources() + genh,
                            dependencies: [crypto_ss.dependencies()],
authz/meson.build +0 -10
index 516d71f2e2..88fa7769cb 100644
@@ -1,4 +1,3 @@
-authz_ss = ss.source_set()
 authz_ss.add(genh)
 authz_ss.add(files(
   'base.c',
@@ -8,12 +7,3 @@ authz_ss.add(files(
 ))
 
 authz_ss.add(when: ['CONFIG_AUTH_PAM', pam], if_true: files('pamacct.c'))
-
-authz_ss = authz_ss.apply(config_host, strict: false)
-libauthz = static_library('authz', authz_ss.sources() + genh,
-                          dependencies: [authz_ss.dependencies()],
-                          name_suffix: 'fa',
-                          build_by_default: false)
-
-authz = declare_dependency(link_whole: libauthz,
-                           dependencies: qom)
Signature · 1 line
2.26.2
#15 lore raw

PATCH 10/10 qom: Move the creation of the library to the main meson.build

In reply to Philippe Mathieu-Daudé

Be consistent creating all the libraries in the main meson.build file.

---
 meson.build     | 8 ++++++++
 qom/meson.build | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)
meson.build +8 -0
index 9ecfe93503..29e397f285 100644
@@ -1069,6 +1069,7 @@ crypto_ss = ss.source_set()
 io_ss = ss.source_set()
 linux_user_ss = ss.source_set()
 qmp_ss = ss.source_set()
+qom_ss = ss.source_set()
 softmmu_ss = ss.source_set()
 specific_fuzz_ss = ss.source_set()
 specific_ss = ss.source_set()
@@ -1331,6 +1332,13 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
 # Library dependencies #
 ########################
 
+qom_ss = qom_ss.apply(config_host, strict: false)
+libqom = static_library('qom', qom_ss.sources() + genh,
+                        dependencies: [qom_ss.dependencies()],
+                        name_suffix: 'fa')
+
+qom = declare_dependency(link_whole: libqom)
+
 authz_ss = authz_ss.apply(config_host, strict: false)
 libauthz = static_library('authz', authz_ss.sources() + genh,
                           dependencies: [authz_ss.dependencies()],
qom/meson.build +0 -8
index a1cd03c82c..062a3789d8 100644
@@ -1,4 +1,3 @@
-qom_ss = ss.source_set()
 qom_ss.add(genh)
 qom_ss.add(files(
   'container.c',
@@ -9,10 +8,3 @@ qom_ss.add(files(
 
 qmp_ss.add(files('qom-qmp-cmds.c'))
 softmmu_ss.add(files('qom-hmp-cmds.c'))
-
-qom_ss = qom_ss.apply(config_host, strict: false)
-libqom = static_library('qom', qom_ss.sources() + genh,
-                        dependencies: [qom_ss.dependencies()],
-                        name_suffix: 'fa')
-
-qom = declare_dependency(link_whole: libqom)
Signature · 1 line
2.26.2
#16 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

Make Meson machinery more consistent, as requested by Paolo.

Philippe Mathieu-Daudé (10):
migration: Only add migration files to the Meson sourceset meson.build: Add comments to clarify code organization meson.build: Sort sourcesets alphabetically
hw/core: Move the creation of the library to the main meson.build
chardev: Move the creation of the library to the main meson.build
migration: Move the creation of the library to the main meson.build
io: Move the creation of the library to the main meson.build
crypto: Move the creation of the library to the main meson.build
authz: Move the creation of the library to the main meson.build
qom: Move the creation of the library to the main meson.build

Quoted 10 lines
 meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----
 authz/meson.build     | 10 -----
 chardev/meson.build   |  6 ---
 crypto/meson.build    | 10 -----
 hw/core/meson.build   |  6 ---
 io/meson.build        | 10 -----
 migration/meson.build |  8 +---
 qom/meson.build       |  8 ----
 8 files changed, 77 insertions(+), 67 deletions(-)

Nice! Apart from the change to patch 1, perhaps move the "Targets" headline a little earlier, namely just before

foreach m : block_mods + softmmu_mods
...
endforeach

Thanks!

Paolo

#17 lore raw
Quoted 26 lines · Paolo Bonzini
Quoted 14 lines · Philippe Mathieu-Daudé

Make Meson machinery more consistent, as requested by Paolo.

Philippe Mathieu-Daudé (10):
migration: Only add migration files to the Meson sourceset meson.build: Add comments to clarify code organization meson.build: Sort sourcesets alphabetically
hw/core: Move the creation of the library to the main meson.build
chardev: Move the creation of the library to the main meson.build
migration: Move the creation of the library to the main meson.build
io: Move the creation of the library to the main meson.build
crypto: Move the creation of the library to the main meson.build
authz: Move the creation of the library to the main meson.build
qom: Move the creation of the library to the main meson.build

Quoted 10 lines
 meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----
 authz/meson.build     | 10 -----
 chardev/meson.build   |  6 ---
 crypto/meson.build    | 10 -----
 hw/core/meson.build   |  6 ---
 io/meson.build        | 10 -----
 migration/meson.build |  8 +---
 qom/meson.build       |  8 ----
 8 files changed, 77 insertions(+), 67 deletions(-)
Quoted 6 lines

Nice! Apart from the change to patch 1, perhaps move the "Targets" headline a little earlier, namely just before

foreach m : block_mods + softmmu_mods
...
endforeach

Oh OK, I was not sure of this block.

Quoted 5 lines

Thanks!

Paolo