qapi/qom: make some QOM properties depend on the build settings

Some QOM properties are associated with ObjectTypes that already
depend on CONFIG_* switches. So to avoid generating dead code,
let's also make the definition of those properties dependent on
the corresponding CONFIG_*.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-ID: <20240604135931.311709-1-sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Make SecretKeyringProperties conditional, too]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Stefano Garzarella 2024-06-04 15:59:31 +02:00 committed by Markus Armbruster
parent 93b799fafd
commit 657ea58ba3
2 changed files with 16 additions and 8 deletions

View file

@ -485,7 +485,8 @@
## ##
{ 'struct': 'SecretKeyringProperties', { 'struct': 'SecretKeyringProperties',
'base': 'SecretCommonProperties', 'base': 'SecretCommonProperties',
'data': { 'serial': 'int32' } } 'data': { 'serial': 'int32' },
'if': 'CONFIG_SECRET_KEYRING' }
## ##
# @TlsCredsProperties: # @TlsCredsProperties:

View file

@ -222,7 +222,8 @@
## ##
{ 'struct': 'CanHostSocketcanProperties', { 'struct': 'CanHostSocketcanProperties',
'data': { 'if': 'str', 'data': { 'if': 'str',
'canbus': 'str' } } 'canbus': 'str' },
'if': 'CONFIG_LINUX' }
## ##
# @ColoCompareProperties: # @ColoCompareProperties:
@ -305,7 +306,8 @@
## ##
{ 'struct': 'CryptodevVhostUserProperties', { 'struct': 'CryptodevVhostUserProperties',
'base': 'CryptodevBackendProperties', 'base': 'CryptodevBackendProperties',
'data': { 'chardev': 'str' } } 'data': { 'chardev': 'str' },
'if': 'CONFIG_VHOST_CRYPTO' }
## ##
# @DBusVMStateProperties: # @DBusVMStateProperties:
@ -514,7 +516,8 @@
'data': { 'evdev': 'str', 'data': { 'evdev': 'str',
'*grab_all': 'bool', '*grab_all': 'bool',
'*repeat': 'bool', '*repeat': 'bool',
'*grab-toggle': 'GrabToggleKeys' } } '*grab-toggle': 'GrabToggleKeys' },
'if': 'CONFIG_LINUX' }
## ##
# @EventLoopBaseProperties: # @EventLoopBaseProperties:
@ -718,7 +721,8 @@
'base': 'MemoryBackendProperties', 'base': 'MemoryBackendProperties',
'data': { '*hugetlb': 'bool', 'data': { '*hugetlb': 'bool',
'*hugetlbsize': 'size', '*hugetlbsize': 'size',
'*seal': 'bool' } } '*seal': 'bool' },
'if': 'CONFIG_LINUX' }
## ##
# @MemoryBackendShmProperties: # @MemoryBackendShmProperties:
@ -748,7 +752,8 @@
## ##
{ 'struct': 'MemoryBackendEpcProperties', { 'struct': 'MemoryBackendEpcProperties',
'base': 'MemoryBackendProperties', 'base': 'MemoryBackendProperties',
'data': {} } 'data': {},
'if': 'CONFIG_LINUX' }
## ##
# @PrManagerHelperProperties: # @PrManagerHelperProperties:
@ -761,7 +766,8 @@
# Since: 2.11 # Since: 2.11
## ##
{ 'struct': 'PrManagerHelperProperties', { 'struct': 'PrManagerHelperProperties',
'data': { 'path': 'str' } } 'data': { 'path': 'str' },
'if': 'CONFIG_LINUX' }
## ##
# @QtestProperties: # @QtestProperties:
@ -884,7 +890,8 @@
## ##
{ 'struct': 'RngRandomProperties', { 'struct': 'RngRandomProperties',
'base': 'RngProperties', 'base': 'RngProperties',
'data': { '*filename': 'str' } } 'data': { '*filename': 'str' },
'if': 'CONFIG_POSIX' }
## ##
# @SevCommonProperties: # @SevCommonProperties: