Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/130192/?format=api
http://patches.dpdk.org/api/patches/130192/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1691778287-15746-2-git-send-email-roretzla@linux.microsoft.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1691778287-15746-2-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1691778287-15746-2-git-send-email-roretzla@linux.microsoft.com", "date": "2023-08-11T18:24:44", "name": "[v4,1/4] build: unblock the use of the MSVC compiler", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "03c46cf3ed91ed2d444f16e4332619946cee4293", "submitter": { "id": 2077, "url": "http://patches.dpdk.org/api/people/2077/?format=api", "name": "Tyler Retzlaff", "email": "roretzla@linux.microsoft.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1691778287-15746-2-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 29197, "url": "http://patches.dpdk.org/api/series/29197/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29197", "date": "2023-08-11T18:24:46", "name": "enable use of the MSVC compiler", "version": 4, "mbox": "http://patches.dpdk.org/series/29197/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/130192/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/130192/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4DF6043037;\n\tFri, 11 Aug 2023 20:25:16 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EE52743266;\n\tFri, 11 Aug 2023 20:24:54 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 89D8342D3F\n for <dev@dpdk.org>; Fri, 11 Aug 2023 20:24:49 +0200 (CEST)", "by linux.microsoft.com (Postfix, from userid 1086)\n id AE57C20FCF79; Fri, 11 Aug 2023 11:24:48 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com AE57C20FCF79", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1691778288;\n bh=hyhOi1PLUMo/vil6U1tGQ2N50L23QIuKidgM0SI79zI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=PD9Uo7/jYEn3QPyM83E2uAyBSFI9z3LHfa7mC3livFG9LIF0Z+1XbeZiDyl/iTcSM\n S27lb4mFiwj2N5LY37u+LN+H5KnJ0ffuJnqXs1+iKMWiSf3BiyL4mFwsSVvdB36bZL\n bYhtpUbl0qHth6SMaOQumaLOMjpGMfiBIi5uaqSA=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,\n david.marchand@redhat.com, thomas@monjalon.net,\n Tyler Retzlaff <roretzla@linux.microsoft.com>", "Subject": "[PATCH v4 1/4] build: unblock the use of the MSVC compiler", "Date": "Fri, 11 Aug 2023 11:24:44 -0700", "Message-Id": "<1691778287-15746-2-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>\n <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 <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Detect when MSVC toolset is available and tweak toolchain arguments\nwhere the meson build system offers no abstraction.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/meson.build | 23 +++++++++++++++--------\n config/x86/meson.build | 10 ++++++----\n lib/meson.build | 13 ++++++++++---\n 3 files changed, 31 insertions(+), 15 deletions(-)", "diff": "diff --git a/config/meson.build b/config/meson.build\nindex d822371..b6c7d48 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -16,7 +16,8 @@ endforeach\n \n # MS linker requires special treatment.\n # TODO: use cc.get_linker_id() with Meson >= 0.54\n-is_ms_linker = is_windows and (cc.get_id() == 'clang')\n+is_ms_compiler = is_windows and (cc.get_id() == 'msvc')\n+is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler)\n \n # set the major version, which might be used by drivers and libraries\n # depending on the configuration options\n@@ -129,12 +130,14 @@ endif\n dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)\n machine_args = []\n \n-# ppc64 does not support -march= at all, use -mcpu and -mtune for that\n-if host_machine.cpu_family().startswith('ppc')\n- machine_args += '-mcpu=' + cpu_instruction_set\n- machine_args += '-mtune=' + cpu_instruction_set\n-else\n- machine_args += '-march=' + cpu_instruction_set\n+if not is_ms_compiler\n+ # ppc64 does not support -march= at all, use -mcpu and -mtune for that\n+ if host_machine.cpu_family().startswith('ppc')\n+ machine_args += '-mcpu=' + cpu_instruction_set\n+ machine_args += '-mtune=' + cpu_instruction_set\n+ else\n+ machine_args += '-march=' + cpu_instruction_set\n+ endif\n endif\n \n toolchain = cc.get_id()\n@@ -253,7 +256,11 @@ if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false\n endif\n \n # add -include rte_config to cflags\n-add_project_arguments('-include', 'rte_config.h', language: 'c')\n+if is_ms_compiler\n+ add_project_arguments('/FI', 'rte_config.h', language: 'c')\n+else\n+ add_project_arguments('-include', 'rte_config.h', language: 'c')\n+endif\n \n # enable extra warnings and disable any unwanted warnings\n # -Wall is added by default at warning level 1, and -Wextra\ndiff --git a/config/x86/meson.build b/config/x86/meson.build\nindex 54345c4..38cc1e3 100644\n--- a/config/x86/meson.build\n+++ b/config/x86/meson.build\n@@ -24,10 +24,12 @@ if cc.has_argument('-mavx512f')\n endif\n endif\n \n-# we require SSE4.2 for DPDK\n-if cc.get_define('__SSE4_2__', args: machine_args) == ''\n- message('SSE 4.2 not enabled by default, explicitly enabling')\n- machine_args += '-msse4'\n+if not is_ms_compiler\n+ # we require SSE4.2 for DPDK\n+ if cc.get_define('__SSE4_2__', args: machine_args) == ''\n+ message('SSE 4.2 not enabled by default, explicitly enabling')\n+ machine_args += '-msse4'\n+ endif\n endif\n \n base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 92cbd6b..7da3698 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -230,9 +230,16 @@ foreach l:libraries\n output: '@0@_exports.def'.format(libname))\n lk_deps += [def_file]\n \n- lk_args = ['-Wl,/def:' + def_file.full_path()]\n- if meson.version().version_compare('<0.54.0')\n- lk_args += ['-Wl,/implib:lib\\\\librte_' + l + '.dll.a']\n+ if is_ms_compiler\n+ lk_args = ['/def:' + def_file.full_path()]\n+ if meson.version().version_compare('<0.54.0')\n+ lk_args += ['/implib:lib\\\\librte_' + l + '.dll.a']\n+ endif\n+ else\n+ lk_args = ['-Wl,/def:' + def_file.full_path()]\n+ if meson.version().version_compare('<0.54.0')\n+ lk_args += ['-Wl,/implib:lib\\\\librte_' + l + '.dll.a']\n+ endif\n endif\n else\n if is_windows\n", "prefixes": [ "v4", "1/4" ] }{ "id": 130192, "url": "