can't compile llvm source on Windows Mobile


The current LLVM source can’t be compiled on Windows 10 Mobile because it uses some Windows APIs that are not available on mobile platform.

Below is a detail example. I would like to get your suggestion on how to work-around this or fix it properly.

This API is tagged as desktop only: CreateJobObjectW, see

It is used in lib/Support/Windows/, then used in lib\Support\Program.cpp and llvm::DisplayGraph indirectly.



If the only place that this is used is in DisplayGraph then it’s probably safe to simply #ifdef it out for Windows Mobile. That API is intended to only be used when debugging, and the kind of debugging environment doesn’t really make sense for a mobile device that doesn’t have the debugger / toolchain running locally. It would probably be worth modifying DisplayGraph to dump the contents of the .dot file in the debugger, when it is not possible to run other programs.