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 6F90F429D8; Tue, 25 Apr 2023 22:09:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0395342D1D; Tue, 25 Apr 2023 22:08:56 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 52E30410D0 for ; Tue, 25 Apr 2023 22:08:51 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 59DE121C2B2F; Tue, 25 Apr 2023 13:08:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 59DE121C2B2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682453330; bh=PtTekxuzCI2IBnW7EyfnXLbM1JfscnL1IuYXg9i9L0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PFDfwFMX9PTiHtzbuSusLPT2AnDqfuQNY/4RMaIaONZe1XkYRCkfYA5tTj2SF2R60 rcPqpgI1WHPzy2QhKjA9zpgGtY6gYn6O9NeOCWR5sMqXOyIWVnpR2lWe/tQZgcqj9Q Rpu2CABk3OLqdS71gWupvu1817DN5r4xBC1ayPn4= From: Tyler Retzlaff To: dev@dpdk.org Cc: bruce.richardson@intel.com, david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3 4/4] build: enable MSVC specific compiler options Date: Tue, 25 Apr 2023 13:08:49 -0700 Message-Id: <1682453329-20435-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1682453329-20435-1-git-send-email-roretzla@linux.microsoft.com> References: <1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com> <1682453329-20435-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 d2b12db..9484449 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