Compiling LLVM for P2 on Windows (attempt)
Supposedly this can work and have made a bit of progress:
Note: This may be all wrong!
Note2: This is probably a lot easier in Linux or Mac...
Install Visual Studio
- Add C++ Clange tools for Windows
- Add latest Win 11 SDK
Install Python
Install CMake
Install Git
Download LLVM P2
Extract "llvm-project-XXX" to somewhere
Create "build" folder under this folder
Run cmake, maybe like this:
cmake -G "Visual Studio 18 2026" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX=/opt/p2llvm -DLLVM_ENABLE_PROJECTS="lld;clang" -DCMAKE_BUILD_TYPE=Release -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=P2 -DLLVM_TARGETS_TO_BUILD="" ../llvm-project/llvm
Use Visual Studio to open "LLVM.slnx" solution.
Build solution. (takes forever)
Find clang.exe under \build\Release\bin
try to build something like:
clang -Os -ffunction-sections -fdata-sections -fno-jump-tables --target=p2 -I .\libc\include -I .\ -o hello.o -c hello.c
Here's where I'm stuck... Got a .o file but the linker doesn't seem to work :{

Comments
Ok, starting over, something is horribly wrong...
On windows 10 or 11 you can install WSL to get an emulated Linux shell, which probably has higher chance of success with this sort of thing. Getting anything to work with CMake on windows is a hassle, even if it's not a massive project like LLVM.
It might be hopeless... Tried again and can compile but not link (again)...
Found something from 4 years ago where @iseries and maybe me? Got it working in windows …
https://forums.parallax.com/discussion/171962/llvm-backend-for-propeller-2/p5
Will try stuff in post #133 there next…