From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=pFONMTJS; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Tue, 30 Apr 2019 04:01:28 -0700 Received: by mail-wr1-f66.google.com with SMTP id a9so20489322wrp.6 for ; Tue, 30 Apr 2019 04:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FWUU0nOAf3qn32DDXKQ7ccNK7hQ0RTiYMU94GmkZdqo=; b=pFONMTJSyqpMW7JKFcmQvAP0726STM3zfz7go5HvZ3gEKePZ7wD3+FgyjFYgwarzPz zujMCNebTWD5F4VsmT0Hq3rwJSmlFM7aUN4SbUnTDeQ3SKitnnHRtM0NNDV0nsi/SPXP L3cU0eOmBowUWRGw108EpKtuk3VlxCqoEsiiIDuhNucIYUcza/+O6BbSyRTlBzFW+uDo wVvXoS1lw83NVnsqT7T/y754bVRZ8Az0351ZgXambCmyoQ1sf7UneYZtuBcR76ySOK7M 9NkafOycFy8ItARqUdkdQbXyQbj3qCCrUVxr0Q/dZX3fikT0n8cQ3VFzniDBVreDcw+/ De4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FWUU0nOAf3qn32DDXKQ7ccNK7hQ0RTiYMU94GmkZdqo=; b=CNx36Q+N4tN86nKue8qu6pIVP6H3hKZq2UW5DNdPWFRxohEodgIEUoQkOlys2IqWGu 5Tbe9pE7TZgjbQaMb1DlmfWCTkKONX6qQ6G7DKmNzIj+lsyksk3ZHK/ACsP2eTASbcSO typ454BMpwpLDWLGBiiIH08untKo8mwot4ezESJcM9wtAmm97TOddBJVivo7JJbA6eU2 1lQYHZVk+xkihU9VU5QdvzuCol3M2gL554q6vFtWMvuRqUgF2lTMQnQNZ/AZ5RBPt/1i UgyynWTWBTPBHsTefzwbUnm0CrP+T1nkhZ6OKTptDwwI5HUYnBUgLIimKkLMvODw7laJ weEg== X-Gm-Message-State: APjAAAXtLmFPPJdr0SE9soMpPxgNDX4G3EZRj5P4Xu0U2qREQ/DF6SLn 7TPDnOJealSHzSjv/ep+ktml7k6WYzM= X-Google-Smtp-Source: APXvYqzdpicoOELILBR2hLCg6inCeAHnY1sX0rY/d9YWNa1kNB+9x2UsPGZ3athOacZZ92jjDQE0OA== X-Received: by 2002:a5d:4acc:: with SMTP id y12mr23838606wrs.234.1556622086070; Tue, 30 Apr 2019 04:01:26 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id x20sm17019041wrg.29.2019.04.30.04.01.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 04:01:25 -0700 (PDT) Date: Tue, 30 Apr 2019 12:01:23 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, liming.gao@intel.com Cc: Ard Biesheuvel Subject: Re: [edk2-devel] [Patch 0/7] Add new CLANG8ELF tool chain for new LLVM/CLANG8 Message-ID: <20190430110123.lbmuqap64ll3wsyk@bivouac.eciton.net> 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> MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E43FCA8@SHSMSX104.ccr.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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. > 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. > > > 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=1603 and the patch submission. The bugzilla entry reads to me only like "add CLANG8 profile" or "make sure CLANG38 profile works with clang 8".. > 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. > > > >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 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. > > > > 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#. 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. / Leif