[LLVMdev] Switching to the new MingW ABI

Rafael Espíndola rafael.espindola at gmail.com
Tue Dec 10 14:41:47 PST 2013


On 10 December 2013 11:18, João Matos <ripzonetriton at gmail.com> wrote:
> The tool uses Clang to parse the user's C/C++ code to get the calling
> conventions from the AST, so they need to match the ones in the compiled
> libraries to allow correct interop. If the user libraries were compiled with
> GCC 4.6 (which stills seems used by some MinGW distros)

Do you have an idea for how long you will have to support these
distros? This change would only show up on clang 3.5, and it is not
even expected to build with gcc 4.6

> then once we upgrade
> to the latest Clang we'll start getting thiscall CC instead of the correct
> one used pre-4.7 for those libraries. If there was something like an
> "-fgcc-abi=4.6" flag we could pass to Clang, then it would provide us with
> the correct CCs for the given GCC version.
>
> If the community thinks that is undesirable for the project then we can work
> around it on our side, but it seems to me these details should be contained
> in Clang.

On the clang side the change should be trivial (note the attached
clang.patch on first email). Do you think that is something you can
keep locally if needed?

If we can avoid creating new ABI options I think that is desirable.

Cheers,
Rafael




More information about the llvm-dev mailing list