xref: /dpdk/lib/vhost/meson.build (revision 53d3f477)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2017-2018 Intel Corporation
3
4if not is_linux
5    build = false
6    reason = 'only supported on Linux'
7endif
8if has_libnuma == 1
9    dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
10endif
11if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
12    cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
13elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
14    cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
15elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
16    cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
17endif
18dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY', cc.has_header('linux/userfaultfd.h'))
19cflags += '-fno-strict-aliasing'
20sources = files(
21        'fd_man.c',
22        'iotlb.c',
23        'socket.c',
24        'vdpa.c',
25        'vhost.c',
26        'vhost_crypto.c',
27        'vhost_user.c',
28        'virtio_net.c',
29)
30headers = files(
31        'rte_vdpa.h',
32        'rte_vhost.h',
33        'rte_vhost_async.h',
34        'rte_vhost_crypto.h',
35)
36driver_sdk_headers = files(
37        'vdpa_driver.h',
38)
39deps += ['ethdev', 'cryptodev', 'hash', 'pci', 'dmadev']
40