From: Andre Muezerie <andremue@linux.microsoft.com>
To: andremue@linux.microsoft.com
Cc: dev@dpdk.org, sameh.gobriel@intel.com, yipeng1.wang@intel.com
Subject: [PATCH v2] member: use common top-level variable for easier maintenance
Date: Mon, 3 Mar 2025 12:47:54 -0800 [thread overview]
Message-ID: <1741034874-13573-1-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1740769261-736-1-git-send-email-andremue@linux.microsoft.com>
Updated meson.build to use common variable cc_avx512_flags for
msvc and avoiding code duplication for other compilers.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
lib/member/meson.build | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/member/meson.build b/lib/member/meson.build
index f92cbb7f25..4341b424df 100644
--- a/lib/member/meson.build
+++ b/lib/member/meson.build
@@ -33,6 +33,11 @@ if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
# compiler flags, and then have the .o file from static lib
# linked into main lib.
+ member_avx512_args = cc_avx512_flags
+ if not is_ms_compiler
+ member_avx512_args += '-mavx512ifma'
+ endif
+
# check if all required flags already enabled
sketch_avx512_flags = ['__AVX512F__', '__AVX512DQ__', '__AVX512IFMA__']
@@ -46,13 +51,12 @@ if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
if sketch_avx512_on == true
cflags += ['-DCC_AVX512_SUPPORT']
sources += files('rte_member_sketch_avx512.c')
- elif cc.has_multi_arguments('-mavx512f', '-mavx512dq', '-mavx512ifma')
+ elif cc.has_multi_arguments(member_avx512_args)
sketch_avx512_tmp = static_library('sketch_avx512_tmp',
'rte_member_sketch_avx512.c',
include_directories: includes,
dependencies: [static_rte_eal, static_rte_hash],
- c_args: cflags +
- ['-mavx512f', '-mavx512dq', '-mavx512ifma'])
+ c_args: cflags + member_avx512_args)
objs += sketch_avx512_tmp.extract_objects('rte_member_sketch_avx512.c')
cflags += ['-DCC_AVX512_SUPPORT']
endif
--
2.48.1.vfs.0.0
prev parent reply other threads:[~2025-03-03 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 19:01 [PATCH] " Andre Muezerie
2025-03-03 15:21 ` Bruce Richardson
2025-03-03 20:49 ` Andre Muezerie
2025-03-03 20:47 ` Andre Muezerie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1741034874-13573-1-git-send-email-andremue@linux.microsoft.com \
--to=andremue@linux.microsoft.com \
--cc=dev@dpdk.org \
--cc=sameh.gobriel@intel.com \
--cc=yipeng1.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).