From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: liming.gao@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Thu, 16 May 2019 06:29:34 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2019 06:29:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,476,1549958400"; d="scan'208";a="172349730" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 16 May 2019 06:29:33 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 16 May 2019 06:29:33 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 16 May 2019 06:29:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.126]) with mapi id 14.03.0415.000; Thu, 16 May 2019 21:29:31 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Gao, Liming" , "leif.lindholm@linaro.org" CC: Ard Biesheuvel Subject: Re: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for new LLVM/CLANG8 Thread-Topic: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for new LLVM/CLANG8 Thread-Index: AQHU/E3ClCQnniT0z0eoB13gdfWnb6ZQvUVAgAIbkgCAATnOQP//9ruAgAgEULCAEc7Y0A== Date: Thu, 16 May 2019 13:29:30 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E44BEF1@SHSMSX104.ccr.corp.intel.com> References: <20190426144242.19024-1-liming.gao@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E431937@SHSMSX104.ccr.corp.intel.com> <20190429165124.cnacggdw4guz2e64@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E43FCA8@SHSMSX104.ccr.corp.intel.com> <20190430110123.lbmuqap64ll3wsyk@bivouac.eciton.net> <159BB5054AE8ABA6.12625@groups.io> In-Reply-To: <159BB5054AE8ABA6.12625@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTllY2QxNmEtZTcwMS00NWVhLTlmNGYtYjIyYTIzOWM3ZjEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZTlNczl6TllwV2FIOHNhTWZuaUhrZnhGZ05IRHZmWkZPVkJ0cXlyekdvUlE0SzlSN24rTkpkTWEwK0RvcDJsQiJ9 dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This topic is discussed in edk2 design meeting. Here is the minutes https:/= /edk2.groups.io/g/announce/topic/31575273 I also collect the image size for OvmfIa32x64 (Bytes). GCC and CLANG enabl= es LTO, VS2015 enables GL.=20 OvmfIa32X64 (Bytes) GCC5 VS2015x86 CLANG8ELF CLANG8PE PEIFV (IA32) 0x2ff28 0x2dfe8 0x2a5a8 0x57028 DXEFV (X64) 0x418528 0x429650 0x3ba6f8 0x502900 FVCOMPACT(Compress) 0x1372e8 0x1204d8 0x1177f0 0x116110 The image size shows new CLANG8ELF tool chain to get the smaller image siz= e than GCC5 and VS2015x86 tool chain. So, I prefer to add CLANG8ELF tool ch= ain first. Then, I will continue to investigate CLANG8PE tool chain and how= to generate the different format debug symbol. If no other comments, I pla= n to add this tool chain for Q2 stable tag.=20 Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Li= ming Gao > Sent: Sunday, May 5, 2019 2:19 PM > To: devel@edk2.groups.io; leif.lindholm@linaro.org > Cc: Ard Biesheuvel > Subject: Re: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for n= ew LLVM/CLANG8 >=20 > >-----Original Message----- > >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of L= eif > >Lindholm > >Sent: Tuesday, April 30, 2019 7:01 PM > >To: devel@edk2.groups.io; Gao, Liming > >Cc: Ard Biesheuvel > >Subject: Re: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for = new > >LLVM/CLANG8 > > > >On Tue, Apr 30, 2019 at 04:21:29AM +0000, Liming Gao wrote: > >> > > >This series confuses me. The existing CLANGxx toolchains already= use > >> > > >GenFw and ELF to PE/COFF conversion, so the name CLANG8ELF is > >> > > >misleading. > >> > > > > >> > > LLVM/CLANG8.0 compiler supports to generate PE image or ELF > >> > > image. This tool chain is to generate ELF image and be converted = to > >> > > PE image. > >> > > >> > Which is what CLANG38 does - so why do we need a completely new > >> > toolchain profile? (Shortly after we got rid of a bunch of unneeded > >> > ones.) > >> > > >> CLANG38 depends on GNU binutils linker. > > > >Yes. > > > >> It supports Linux only. > > > >Really? > >I mean, I haven't tested it on Windows, but I don't think there is any > >fundamental limitation that should prevent it from working? > It may work on Windows. But, no one try the step. > > > >> It requires CLANG source code to be compiled, and be used. > > > >OK, that is inconvenient. > >I think you can get it through cygwin, but that creates other problems. > > > >> CLANG8ELF depends on LLVM LLD. > > > >I would flip that statement. > >It enables the use of LLD. > Yes. > > > >> LLVM/CLANG release provides the prebuilt binaries > >> for Windows/Linux/Mac. It is easy for user to setup the > >> environment. User can also use this tool chain in the different OS. > > > >It was always my understanding that this was the intent of the CLANG## > >profiles. So I do not see this as an added benefit. > > > Yes. Easy use single tool chain is the main purpose. > >> > > I am investigating another tool chain with CLANG8.0 to > >> > > directly generate PE image. To differentiate them, I use the tool > >> > > chain name CLANG8ELF and CLANG8PE for them. > >> > > >> > Why do we want two different toolchain profiles that generate > >> > identical output in different ways, using the same tools? > >> > >> Generate the different debug symbols (DWARF, PDB) for the different > >> debugger. Windows user may use WinDbg for the source level > >> debug. > > > >OK, this is a big deal, and I wish this had been mentioned both in the > >https://bugzilla.tianocore.org/show_bug.cgi?id=3D1603 and the patch > >submission. > > > >The bugzilla entry reads to me only like "add CLANG8 profile" or "make > >sure CLANG38 profile works with clang 8".. > > > Sorry for this confuse. I add such information in BZ. > >> Generate the different executable image to run Emulator in Windows > >> or Linux. > >> > >> I need that CLANG8 tool chain provides the same functionality to > >> VS2015, GCC and XCODE tool chain. If so, the developer can use the > >> single tool chain for his development. > > > >Again, I don't see this as being any different from what CLANG38 > >already gives us. > The difference is linker LLD or LD. > > > >> > > >Also, it seems that the primary difference is using LLD instead = of GNU > >> > > >ld, but this has nothing to do with the Clang version. > >> > > > > >> > > >What is the benefit of using LLD over GNU ld? It seems we are wo= rking > >> > > >around various incompatibilities, and I think this is only justi= fied > >> > > >if LLD has some benefit over GNU ld. > >> > > > >> > > LLD is part of LLVM/CLANG8 tool set. User can get all required > >> > > compilers and linkers from > >> > > http://releases.llvm.org/download.html#8.0.0. > >> > > LLVM8 release includes Windows/Linux/Mac version. User can > >download > >> > > it and install them together. This tool chain is the unified tool > >> > > chain to be used in Windows/Linux/Mac OS. > >> > > >> > Can we note already build under all of these operating systems with > >> > the GNU binutils linker? > >> > >> I am not sure. Now, I use VS2015 on Windows OS, use GCC5 on Linux > >> OS, and XCODE5 on Mac OS. > >> VS2015 and XCODE5 doesn't use GNU binutils linker. > > > >Indeed. > > > >So, to summarise - I am all for adding a toolchain profile that uses > >clang with lld (this is also available with Linux distribution > >packaged toolchains). But that is what we're doing - the fact that it's > >version 8 of clang is beside the point. > >If we cannot do this with a profile called CLANG8, then I would prefer > >if we can call it LLDCLANG#. > Yes. New tool chain will use LLD linker. I find previous version LLD has= one issue > https://bugs.llvm.org/show_bug.cgi?id=3D39810. It causes the build failu= re in edk2 build. > This issue is fixed in LLVM8.0 release. So, I name this tool chain as CL= ANG8. > I am OK to add LLD in tool chain name. So, new tool chain will be LLDCLA= NG8ELF. > > > >I think if we are able to add another profile for native PE (and PDB), > >that would be excellent. But the name ought to emphasise what the > >functional difference in the output is rather than what the > >intermediate steps are. > Yes. This is also in my plan. > > > >/ > > Leif > > > > >=20 >=20 >=20