[cfe-dev] TextDiagnosticPrinter::HandleDiagnostic() question
John McCall
rjmccall at apple.com
Fri Apr 22 16:32:25 PDT 2011
On Apr 22, 2011, at 4:29 PM, Andrew Fish wrote:
>>> Seems to me that LangOpts->Microsoft implies code construction and not OS version that the system is running on?
>>
>> I agree; this should be triggered by the target, not LangOptions.Microsoft. On the other hand...
>>
>>> So how could we make normal clang diagnostics appear for for the 86_64-pc-win32-macho triple?
>>
>> ...I would think that this triple suggests a Microsoft target.
>>
>
> 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?
John.
More information about the cfe-dev
mailing list