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