Skip to content

Commit

Permalink
meson: build contrib/plugins with meson
Browse files Browse the repository at this point in the history
Tried to unify this meson.build with tests/tcg/plugins/meson.build but
the resulting modules are not output in the right directory.

Originally proposed by Anton Kochkov, thank you!

Solves: https://gitlab.com/qemu-project/qemu/-/issues/1710
Signed-off-by: Pierrick Bouvier <[email protected]>
  • Loading branch information
pbo-linaro committed Oct 16, 2024
1 parent f5c3f07 commit accd710
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions contrib/plugins/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
t = []
if get_option('plugins')
foreach i : ['cache', 'drcov', 'execlog', 'hotblocks', 'hotpages', 'howvec',
'hwprofile', 'ips', 'lockstep', 'stoptrigger']
if host_os == 'windows'
t += shared_module(i, files(i + '.c') + 'win32_linker.c',
include_directories: '../../include/qemu',
link_depends: [win32_qemu_plugin_api_lib],
link_args: ['-Lplugins', '-lqemu_plugin_api'],
dependencies: glib)

else
t += shared_module(i, files(i + '.c'),
include_directories: '../../include/qemu',
dependencies: glib)
endif
endforeach
endif
if t.length() > 0
alias_target('contrib-plugins', t)
else
run_target('contrib-plugins', command: find_program('true'))
endif
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3682,6 +3682,10 @@ subdir('accel')
subdir('plugins')
subdir('ebpf')

if 'CONFIG_TCG' in config_all_accel
subdir('contrib/plugins')
endif

common_user_inc = []

subdir('common-user')
Expand Down

0 comments on commit accd710

Please sign in to comment.