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.151, mailfrom: liming.gao@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Mon, 29 Apr 2019 21:21:33 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Apr 2019 21:21:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,412,1549958400"; d="scan'208";a="153461975" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 29 Apr 2019 21:21:32 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 29 Apr 2019 21:21:32 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 29 Apr 2019 21:21:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.129]) with mapi id 14.03.0415.000; Tue, 30 Apr 2019 12:21:30 +0800 From: "Liming Gao" 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 new LLVM/CLANG8 Thread-Topic: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for new LLVM/CLANG8 Thread-Index: AQHU/E3ClCQnniT0z0eoB13gdfWnb6ZQvUVAgAIbkgCAATnOQA== Date: Tue, 30 Apr 2019 04:21:29 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E43FCA8@SHSMSX104.ccr.corp.intel.com> References: <20190426144242.19024-1-liming.gao@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E431937@SHSMSX104.ccr.corp.intel.com> <20190429165124.cnacggdw4guz2e64@bivouac.eciton.net> In-Reply-To: <20190429165124.cnacggdw4guz2e64@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODAxYjMzYzgtMzUzNS00ZWJhLTk1YzMtNDI4NjFmNTEzOGZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiempcLzh4NVNBbXBrVmlyaFFvMnhzV3RIa0dvYzkyVnJCblVRTDQ2S0hLREh0UjZZSERrRGllMGJ3b3QzMVdHaHQifQ== 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 > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Le= if Lindholm > Sent: Tuesday, April 30, 2019 12:51 AM > To: devel@edk2.groups.io; Gao, Liming > Cc: Ard Biesheuvel > Subject: Re: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for n= ew LLVM/CLANG8 >=20 > On Sun, Apr 28, 2019 at 12:55:02AM +0000, Liming Gao wrote: > > >> This tool chain can be used to compile the firmware code. On window= s OS, > > >> Visual Studio is still required to compile BaseTools C tools and > > >> provide nmake.exe for makefile. On Linux/Mac OS, gcc is used to com= pile > > >> BaseTools C tools. make is used for makefile. > > >> > > >> This tool chain is verified on OVMF Ia32, X64 and Ia32X64 to boot S= hell. > > >> This tool chain is verified in Windows/Linux and Mac OS. > > > > > >Hello Liming, > > > > > >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. >=20 > 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.) >=20 CLANG38 depends on GNU binutils linker. It supports Linux only. It require= s CLANG source code to be compiled, and be used.=20 CLANG8ELF depends on LLVM LLD. LLVM/CLANG release provides the prebuilt bi= naries=20 for Windows/Linux/Mac. It is easy for user to setup the environment. User = can also use this tool chain in the different OS. > > 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. >=20 > 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 debugg= er. Windows user may use WinDbg for the source level debug. Generate the different executable image= to run Emulator in Windows or Linux. I need that CLANG8 tool chain provides the same functionality to VS2015, G= CC and XCODE tool chain.=20 If so, the developer can use the single tool chain for his development.=20 >=20 > > >Also, it seems that the primary difference is using LLD instead of GN= U > > >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 working > > >around various incompatibilities, and I think this is only justified > > >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. >=20 > Can we note already build under all of these operating systems with > the GNU binutils linker? >=20 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. > When developing under Linux, I will use the toolchain provided by my > distribution. >=20 > / > Leif >=20 >=20