Advertising

With that in mind we should probably also add x86 to the unified def
proposal but at the same time keep the old i386 def files for binutils
dlltool. 
We can use a flag to just change between them both at compile time. 
The def files for x86 should be identical to x64, arm, arm64 etc bar
functions it does not have because we should not need any macro trickery we
discussed previously as InitializeCriticalSection will convert directly to
_InitializeCriticalSection when the short library is created, given the
fact we do not need the @4 this is directly equivalent to
_InitializeCriticalSection@4 in the old format. 

No, you're drawing the completely wrong conclusions here, as I also said
in the review discussion for llvm-dlltool. 

We can't live without the stdcall suffixes in def files for i386, they're
essential for actually being able to link to the import library (and
dlltool can't make up the suffix out of thin air).  It's only that when you
link to it, the reference to the DLL should refer to a undecorated name
(handled via -k for GNU dlltool afaik, handled via setting the "name type"
to undecorate in lld/llvm-dlltool/link.exe).