1 if not get_option('plugins')
5 # Modules need more symbols than just those in plugins/qemu-plugins.symbols
9 input: files('qemu-plugins.symbols'),
10 output: 'qemu-plugins-ld64.symbols',
12 command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@'])
13 emulator_link_args += ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols']
15 emulator_link_args += ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')]
19 if host_os == 'windows'
20 dlltool = find_program('dlltool', required: true)
22 # Generate a .lib file for plugins to link against.
23 # First, create a .def file listing all the symbols a plugin should expect to have
25 win32_plugin_def = configure_file(
26 input: files('qemu-plugins.symbols'),
27 output: 'qemu_plugin_api.def',
29 command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
30 # then use dlltool to assemble a delaylib.
31 win32_qemu_plugin_api_lib = configure_file(
32 input: win32_plugin_def,
33 output: 'libqemu_plugin_api.a',
34 command: [dlltool, '--input-def', '@INPUT@',
35 '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe']
38 specific_ss.add(files(