[LLVMdev] Unifying Windows Target Triples

Saleem Abdulrasool abdulras at fb.com
Thu Feb 27 19:40:05 PST 2014


Hi,

After a discussion with David, Id like to propose a rework of the Windows target triples.  The current set of Windows triples are somewhat less uniform than their Linux counterparts.  With multiple ABIs and environments on Windows, they are also slightly awkward.  Obviously, certain ones might be nice to keep around for compatibility (e.g. the mingw triple).

Just to ensure that everyone has the same understanding, the canonical format for a triple is: arch-vendor-os-environment .

We have the following environment on Windows:

As far as I know, everyone conforms to the MS C ABI.
- There is the MS C++ ABI which is still being developed.
- There is the IA-64 ABI which is incompatible with msvcprt.
- There is the MinGW sub environment which supplies additional UNIX-y functions and uses IA-64 ABI for C++.

The Windows environment is uniformly (COFF)/PE.

As for the OS, Windows is slightly generic.  Windows 9x, Windows NT, and Windows CE are all slightly different.  However, given that Microsoft has taken a unifying strategy with Windows NT, I *think* sticking to Windows for the OS should be okay.  That said, I could be convinced to use winnt or windowsnt.

So, one way to clearly define a naming scheme for this space would be something along the lines of:

{armv7,i686,x86_64}-windows-{ia,mingw,ms}pe

This allows us to uniformly take any of the combination IA-64 or MS C++ ABI + MS C ABI or the MinGW environment (which is IA-64 ABI and its supplementary libraries).

I understand that this may be controversial since it can potentially break existing code bases, but I think that the result of this is worth it.

-- 
Saleem Abdulrasool
abdulras (at) fb (dot) com









More information about the llvm-dev mailing list