common/cnxk: convert warning to debug print
[dpdk.git] / drivers / net / hns3 / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018-2021 Hisilicon Limited
3
4 if not is_linux
5     build = false
6     reason = 'only supported on Linux'
7     subdir_done()
8 endif
9
10 if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_64')
11     build = false
12     reason = 'only supported on x86_64 and aarch64'
13     subdir_done()
14 endif
15
16 sources = files(
17         'hns3_cmd.c',
18         'hns3_dcb.c',
19         'hns3_intr.c',
20         'hns3_ethdev.c',
21         'hns3_ethdev_vf.c',
22         'hns3_fdir.c',
23         'hns3_flow.c',
24         'hns3_mbx.c',
25         'hns3_regs.c',
26         'hns3_rss.c',
27         'hns3_rxtx.c',
28         'hns3_stats.c',
29         'hns3_mp.c',
30         'hns3_tm.c',
31         'hns3_ptp.c',
32         'hns3_common.c',
33         'hns3_ethdev_dump.c',
34 )
35
36 deps += ['hash']
37
38 if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
39     sources += files('hns3_rxtx_vec.c')
40
41     # compile SVE when:
42     # a. support SVE in minimum instruction set baseline
43     # b. it's not minimum instruction set, but compiler support
44     if dpdk_conf.has('RTE_HAS_SVE_ACLE')
45         sources += files('hns3_rxtx_vec_sve.c')
46     elif cc.has_argument('-march=armv8.2-a+sve') and cc.check_header('arm_sve.h')
47         cflags += ['-DRTE_HAS_SVE_ACLE=1']
48         sve_cflags = []
49         foreach flag: cflags
50             if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
51                 sve_cflags += flag
52             endif
53         endforeach
54         hns3_sve_lib = static_library('hns3_sve_lib',
55                         'hns3_rxtx_vec_sve.c',
56                         dependencies: [static_rte_ethdev],
57                         include_directories: includes,
58                         c_args: [sve_cflags, '-march=armv8.2-a+sve'])
59         objs += hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c')
60     endif
61 endif