From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0624743037; Fri, 11 Aug 2023 20:25:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB70543263; Fri, 11 Aug 2023 20:24:53 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7D4DA40F16 for ; Fri, 11 Aug 2023 20:24:49 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id D839D20FD0C5; Fri, 11 Aug 2023 11:24:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D839D20FD0C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1691778288; bh=YX//ABU7tumjmlnXX2UooiCrGR3mn/9WjB9AGwVXs8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YbowlDle37azgdydZmwLgzdh8dLLdcmfBLGF2Iv+dBKXj/wQoD6wFn/eSQVRQ4e/D sffFGZlBkOSTWTTNdQX6ZaCYsbW/Iy+kjs/cueikXlY/RqClPGAsXQAlqd793+3EcA apvaX7QIUbPy/1CBIuEzxUAUNuUXBtNR7tionVs8= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Konstantin Ananyev , david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v4 4/4] build: enable MSVC specific compiler options Date: Fri, 11 Aug 2023 11:24:47 -0700 Message-Id: <1691778287-15746-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1691778287-15746-1-git-send-email-roretzla@linux.microsoft.com> References: <1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com> <1691778287-15746-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org * Enable optional use of C11 atomics support. * Enable use of C23 typeof operator. * Explicitly force intrinsics when building with MSVC. * Disable MSVC C runtime checks. Signed-off-by: Tyler Retzlaff --- config/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/meson.build b/config/meson.build index 821a1c3..839057a 100644 --- a/config/meson.build +++ b/config/meson.build @@ -27,6 +27,14 @@ dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1) is_ms_compiler = is_windows and (cc.get_id() == 'msvc') is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler) +# MS compiler (except x86) does not support inline assembly +if is_ms_compiler + dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1) + dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) + add_project_arguments('/experimental:c11atomics', language: 'c') + add_project_arguments('/d1experimental:typeof', language: 'c') +endif + # set the major version, which might be used by drivers and libraries # depending on the configuration options pver = meson.project_version().split('.') -- 1.8.3.1