backengineering / llvm-msvc

[WIP] A forked version of LLVM-18 that prioritizes MSVC compatibility. This version is tailored for Windows users.
GNU Affero General Public License v3.0
216 stars 49 forks source link

x86 support? #56

Closed alberts8 closed 8 months ago

alberts8 commented 11 months ago

The Readme only mentions the 64-bit drivers, how good or bad is the x86 support?

gmh5225 commented 11 months ago

I haven't tested it on the X86-32 system yet, but it should work in theory. If you run into any issues, just let me know.

alberts8 commented 11 months ago

So far the issues i had turned out to be mistakes in the code which didn't cause problems with MSVC. Fixing these made me miss Edit and Continue.

gmh5225 commented 11 months ago

If you run into issues. You can provide a demo project. We'll see.

alberts8 commented 11 months ago

In case i encounter a programming issue in my code that msvc doesn't care about but clang does is that even in the scope of this fork? I would think i should fix it on my side.

gmh5225 commented 11 months ago

Let me see your code.

alberts8 commented 11 months ago

I'am compiling a dll for a Civilization IV modding project which is using the msvc 7.1 runtime. The _vsnprintf function from that ancient runtime behaves differently with clang when the arguments don't match the format specifier. Like mixing char and wchar when using %s.

gmh5225 commented 11 months ago

Got it. In this case. I suggest you make changes to the code.

alberts8 commented 11 months ago

Overall the compatability even with vanilla clang is surprisingly good. It's easier to use clang to compile against the 7.1 runtime as using a up to date msvc compiler is. The msvc compiler relies heavily on the runtime which makes this a challenge. However this depends on things like code quality because in some cases msvc is more tolerant.

gmh5225 commented 11 months ago

Agreed, if you have any other issues, feel free to give us feedback.