@@ -24,23 +24,21 @@ sources += files(
2424deps += [' kvargs' , ' bus_pci' ]
2525
2626if arch_subdir == ' x86'
27- if not machine_args.contains(' -mno-avx512f' )
28- if cc.has_argument(' -mavx512f' ) and cc.has_argument(' -mavx512vl' ) and cc.has_argument(' -mavx512bw' )
29- cflags += [' -DCC_AVX512_SUPPORT' ]
30- virtio_avx512_lib = static_library (' virtio_avx512_lib' ,
31- ' virtio_rxtx_packed.c' ,
32- dependencies : [static_rte_ethdev,
33- static_rte_kvargs, static_rte_bus_pci],
34- include_directories : includes,
35- c_args : [cflags, ' -mavx512f' , ' -mavx512bw' , ' -mavx512vl' ])
36- objs += virtio_avx512_lib.extract_objects(' virtio_rxtx_packed.c' )
37- if (toolchain == ' gcc' and cc.version().version_compare(' >=8.3.0' ))
38- cflags += ' -DVIRTIO_GCC_UNROLL_PRAGMA'
39- elif (toolchain == ' clang' and cc.version().version_compare(' >=3.7.0' ))
40- cflags += ' -DVIRTIO_CLANG_UNROLL_PRAGMA'
41- elif (toolchain == ' icc' and cc.version().version_compare(' >=16.0.0' ))
42- cflags += ' -DVIRTIO_ICC_UNROLL_PRAGMA'
43- endif
27+ if cc_has_avx512
28+ cflags += [' -DCC_AVX512_SUPPORT' ]
29+ virtio_avx512_lib = static_library (' virtio_avx512_lib' ,
30+ ' virtio_rxtx_packed.c' ,
31+ dependencies : [static_rte_ethdev,
32+ static_rte_kvargs, static_rte_bus_pci],
33+ include_directories : includes,
34+ c_args : cflags + cc_avx512_flags)
35+ objs += virtio_avx512_lib.extract_objects(' virtio_rxtx_packed.c' )
36+ if (toolchain == ' gcc' and cc.version().version_compare(' >=8.3.0' ))
37+ cflags += ' -DVIRTIO_GCC_UNROLL_PRAGMA'
38+ elif (toolchain == ' clang' and cc.version().version_compare(' >=3.7.0' ))
39+ cflags += ' -DVIRTIO_CLANG_UNROLL_PRAGMA'
40+ elif (toolchain == ' icc' and cc.version().version_compare(' >=16.0.0' ))
41+ cflags += ' -DVIRTIO_ICC_UNROLL_PRAGMA'
4442 endif
4543 endif
4644 sources += files (' virtio_rxtx_simple_sse.c' )
0 commit comments