99a33e92603595517c4ef531341283e0d9b0c356
[dpdk.git] / drivers / net / iavf / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
3
4 cflags += ['-Wno-strict-aliasing']
5
6 includes += include_directories('../../common/iavf')
7 deps += ['common_iavf']
8
9 sources = files(
10         'iavf_ethdev.c',
11         'iavf_rxtx.c',
12         'iavf_vchnl.c',
13         'iavf_generic_flow.c',
14 )
15
16 if arch_subdir == 'x86'
17         sources += files('iavf_rxtx_vec_sse.c')
18
19         # compile AVX2 version if either:
20         # a. we have AVX supported in minimum instruction set baseline
21         # b. it's not minimum instruction set, but supported by compiler
22         if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
23                 cflags += ['-DCC_AVX2_SUPPORT']
24                 sources += files('iavf_rxtx_vec_avx2.c')
25         elif cc.has_argument('-mavx2')
26                 cflags += ['-DCC_AVX2_SUPPORT']
27                 iavf_avx2_lib = static_library('iavf_avx2_lib',
28                                 'iavf_rxtx_vec_avx2.c',
29                                 dependencies: [static_rte_ethdev,
30                                         static_rte_kvargs, static_rte_hash],
31                                 include_directories: includes,
32                                 c_args: [cflags, '-mavx2'])
33                 objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c')
34         endif
35 endif