Shop OBEX P1 Docs P2 Docs Learn Events
Compiling LLVM for P2 on Windows (attempt) — Parallax Forums

Compiling LLVM for P2 on Windows (attempt)

RaymanRayman Posts: 16,276
edited 2026-04-12 16:30 in Propeller 2

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

Sign In or Register to comment.