Building Compiler-RT on Windows

[+Saleem]

While looking closer at the CMake build system, it appears that you cannot use CMake to cross compile Compiler-RT on Windows. In lib\builtins\CMakeLists.txt it has a “if (NOT WIN32)” that should make it so that it doesn’t use the target specific file lists if compiling on Windows.

[+Saleem]

I am using CMake 3.1.2.

It looks like your command fails early in CMake TryCompile tests. Does
(your version of) CMake supports using Clang on Windows at all?

Has anyone built Compiler-RT on Windows? I am attempting to compile it
for ARM, but I get errors from CMake. It appears to be trying to pass VC++
flags to Clang. I am using a version of Clang built from trunk.

This is unclear to me. Are you trying to build it for Windows ARM? Or
some other ARM environment?

I am attempting to build for bare-metal ARM.

I am attempting to build for bare-metal ARM.

I found that cross-compiling compiler-rt was best achieved by either using
the Make based build, or by writing your own CMakeList.txt outside of the
included build system. Note that you will need a sys root if you are
trying to build the sanitizers or the profiler.