From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BE5F8A05D3 for ; Tue, 21 May 2019 15:52:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A358C4CAB; Tue, 21 May 2019 15:52:42 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 718AA4C80 for ; Tue, 21 May 2019 15:52:41 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 06:52:40 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by fmsmga004.fm.intel.com with SMTP; 21 May 2019 06:52:37 -0700 Received: by (sSMTP sendmail emulation); Tue, 21 May 2019 14:52:36 +0100 Date: Tue, 21 May 2019 14:52:36 +0100 From: Bruce Richardson To: Adham Masarwah Cc: "Menon, Ranjit" , "dev@dpdk.org" , Omar Cardona , Harini Ramakrishnan , Jeffrey Tippet , "Kadam, Pallavi" , Yohad Tor , Rani Sharoni , Tal Shnaiderman Message-ID: <20190521135236.GA1364@bricha3-MOBL.ger.corp.intel.com> References: <7603DC8746F9FC4D82EF0929C467267A736870C2@ORSMSX112.amr.corp.intel.com> <20190521082211.GA1354@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] Generating Debug information in Windows using Clang (PDB files) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, May 21, 2019 at 01:41:06PM +0000, Adham Masarwah wrote: > > >From: Bruce Richardson > >Sent: Tuesday, May 21, 2019 11:22 AM > > > >On Mon, May 20, 2019 at 07:02:22PM +0100, Menon, Ranjit wrote: > >> Adham… > >> > >> I don’t think we debugged using clang compiled code for Hello world – > >> mainly because it was only a “helloworld” application and we didn’t > >> quite need any debugging!:-) > >> > >> > >> I found this link: > >> [1]https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.llvm.org%2F2017%2F08%2Fllvm-on-windows-now-supports-pdb-debug&data=02%7C01%7Cadham%40mellanox.com%7Cea97cb9cae684d72bbed08d6ddc57192%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636940237422999520&sdata=2PxSjEyx%2BXatdDKMtVcXFlWQ5jnBM9nK2782jnRg1BA%3D&reserved=0. > >> html > >> > >> …which says to use the following: > >> > >> Here are two simple ways to test out this new functionality: > >> 1. Have clang-cl invoke lld automatically > >> > >> clang-cl -fuse-ld=lld -Z7 -MTd hello.cpp > >> 2. Invoke clang-cl and lld separately. > >> > >> clang-cl -c -Z7 -MTd -o hello.obj hello.cpp > >> > >> lld-link -debug hello.obj > >> > >> Can you try it with just the -Z7 option? > >> > >> > >> I’m also adding some persons from Microsoft to this thread, hoping they > >> can help… > >> > >> > >> +Harini +Omar +Jeffrey > >> > >> > >> ranjit m. > >> > >Part of the issue may be that we use clang, rather than clang-cl on windows. > > > >/Bruce > > I did a small test to check clang vs clang-cl, the compiled binary and the PDB file from the Clang-cl seems working fine in WinDbg. > The problem we have that the meson.build files are not compatible with clang-cl, and the meson build command is failing. > This is the first error: > config\x86\meson.build:23:1: ERROR: Problem encountered: SSE4.2 instruction set is required for DPDK. > Please set the machine type to "nehalem" or "corei7" or higher value > > /Adham Yes, the clang-cl compiler (like msvc) does not offer the flags we need to control the exact output microarchitecture. It also uses completely different flag formats for things like warnings etc, which is why we need to use clang instead. /Bruce