[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC server 01/11] vfio-user: build library
From: |
John Levon |
Subject: |
Re: [PATCH RFC server 01/11] vfio-user: build library |
Date: |
Mon, 19 Jul 2021 20:24:10 +0000 |
On Mon, Jul 19, 2021 at 04:00:03PM -0400, Jagannathan Raman wrote:
> add the libvfio-user library as a submodule. build it as part of QEMU
>
> diff --git a/meson.build b/meson.build
> index 6e4d2d8..f2f9f86 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1894,6 +1894,41 @@ if get_option('cfi') and slirp_opt == 'system'
> + ' Please configure with --enable-slirp=git')
> endif
>
> +vfiouser = not_found
> +if have_system and multiprocess_allowed
> + have_internal = fs.exists(meson.current_source_dir() /
> 'libvfio-user/Makefile')
> +
> + if not have_internal
> + error('libvfio-user source not found - please pull git submodule')
> + endif
> +
> + vfiouser_files = [
> + 'libvfio-user/lib/dma.c',
> + 'libvfio-user/lib/irq.c',
> + 'libvfio-user/lib/libvfio-user.c',
> + 'libvfio-user/lib/migration.c',
> + 'libvfio-user/lib/pci.c',
> + 'libvfio-user/lib/pci_caps.c',
> + 'libvfio-user/lib/tran_sock.c',
> + ]
> +
> + vfiouser_inc = include_directories('libvfio-user/include',
> 'libvfio-user/lib')
> +
> + json_c = dependency('json-c', required: false)
> + if not json_c.found()
> + json_c = dependency('libjson-c')
> + endif
> +
> + libvfiouser = static_library('vfiouser',
> + build_by_default: false,
> + sources: vfiouser_files,
> + dependencies: json_c,
> + include_directories: vfiouser_inc)
> +
> + vfiouser = declare_dependency(link_with: libvfiouser,
> + include_directories: vfiouser_inc)
> +endif
Why this way, rather than recursing into the submodule? Seems a bit fragile to
encode details of the library here.
regards
john
- [PATCH RFC server 00/11] vfio-user server in QEMU, (continued)
- [PATCH RFC server 00/11] vfio-user server in QEMU, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 07/11] vfio-user: handle DMA mappings, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 08/11] vfio-user: handle PCI BAR accesses, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 10/11] vfio-user: register handlers to facilitate migration, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 09/11] vfio-user: handle device interrupts, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 11/11] vfio-user: acceptance test, Jagannathan Raman, 2021/07/19
- [PATCH RFC server 01/11] vfio-user: build library, Jagannathan Raman, 2021/07/19
[PATCH RFC server 03/11] vfio-user: instantiate vfio-user context, Jagannathan Raman, 2021/07/19
[PATCH RFC server 02/11] vfio-user: define vfio-user object, Jagannathan Raman, 2021/07/19
[PATCH RFC server 04/11] vfio-user: find and init PCI device, Jagannathan Raman, 2021/07/19
[PATCH RFC server 06/11] vfio-user: handle PCI config space accesses, Jagannathan Raman, 2021/07/19