[cfe-dev] TextDiagnosticPrinter::HandleDiagnostic() question

Carl Norum carl.norum at apple.com
Fri Apr 22 16:37:22 PDT 2011


On Apr 22, 2011, at 4:32 PM, John McCall wrote:
> On Apr 22, 2011, at 4:29 PM, Andrew Fish wrote:
>> Our target is really EFI  system firmware (http://www.uefi.org/) so all we need is the win32 ABI and not any of the system stuff. The edk2 (http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK2) is an open source EFI code base  that supports lots of flavors of compilers like Visual Studio 2003 - 2010, Intel, gcc, clang, and others for ARMv7, i386, 86_64, and Itanium processors, and you can build on Windows, Linux, or Mac OS X systems. The edk2 code base is C and there is zero dependency on any system libraries, not even for compiler intrinsics. Also there is a cctools command line tool, mtoc, that will convert a Mach-0 to an EFI PE/COFF executable (not a Windows PE/COFF executable!). We need the Mach-O for source level debugging. 
>> 
>> So the 86_64-pc-win32-macho triple really means build and run a debugger for 86_64 EFI firmware on Mac OS X.  The EFI 86_64 binaries can run on any 86_64 EFI system or emulator. 
> 
> I don't know why this triple means that.  Maybe you need your own triple?

The triple means that because it's what we were asked to make it when we put it in originally.  I think it makes sense - 64-bit Win32 ABI code in a Mach-O object file.

I think Douglas' suggestion to add an option to DiagnosticOptions sounds reasonable - the only question I'd still have is how to hook up that option as a default for non-Mach-O triples, to avoid breaking anyone who currently depends on the MSVC-style diagnostic messages.

-- Carl




More information about the cfe-dev mailing list