Remove leading underscores from exported symbols


I noticed something about when Clang exports symbols: they are exported with a leading underscore(_). This can cause linker errors like crazy when building shared libraries or Python extensions under Windows. My request is that the leading underscore is removed. I’m not sure if this is in LLVM, not Clang, but it causes problems on Windows nonetheless.

Also, please alert me is I am posting in the wrong mailing list. I’m kinda new here… :slight_smile:

Clang adds the prefix because it’s part of the ABI. It’s what both MSVC and gcc do for functions declared with the C calling convention on 32-bit Windows. Why is the underscore prefix missing for Python?