]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/dpdk/lib/librte_acl/meson.build
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_acl / meson.build
CommitLineData
11fdf7f2
TL
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2017 Intel Corporation
3
4version = 2
5sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c',
6 'rte_acl.c', 'tb_mem.c')
7headers = files('rte_acl.h', 'rte_acl_osdep.h')
8
9if arch_subdir == 'x86'
10 sources += files('acl_run_sse.c')
11
12 # compile AVX2 version if either:
13 # a. we have AVX supported in minimum instruction set baseline
14 # b. it's not minimum instruction set, but supported by compiler
15 #
16 # in former case, just add avx2 C file to files list
17 # in latter case, compile c file to static lib, using correct compiler
18 # flags, and then have the .o file from static lib linked into main lib.
19 if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
20 sources += files('acl_run_avx2.c')
21 cflags += '-DCC_AVX2_SUPPORT'
22 elif cc.has_argument('-mavx2')
23 avx2_tmplib = static_library('avx2_tmp',
24 'acl_run_avx2.c',
25 dependencies: static_rte_eal,
9f95a23c 26 c_args: cflags + ['-mavx2'])
11fdf7f2
TL
27 objs += avx2_tmplib.extract_objects('acl_run_avx2.c')
28 cflags += '-DCC_AVX2_SUPPORT'
29 endif
30
31endif