Cross Compiling LLVM for Windows on macOS?

Hi:
For reasons I need to build LLVM Windows on my macOS host if possible. I’ve learnt that lld current supports COFF linking and the online guide provided clang commands for doing so. I’d like to know the correct way to do this since the guide I’ve found seems a little bit confusing

Zhang

You will need to find a way to get a Windows SDK and CRT onto your Mac box. Probably the “proper” way to do this is install them both on a physical Windows machine (or VM), and then manually copy them over to your mac partition.

After you have this, take a look at llvm/cmake/platforms/WinMsvc.cmake.

The instructions are a bit confusing, but should be complete. If there’s a specific step in that file that you’re confused about, let me know which one.

Using mingw libs may be one step.

2018年8月29日(水) 19:03 Zhang via llvm-dev <llvm-dev@lists.llvm.org>: