This patch attempts to port LLVM testsuite SingleSource tests to Windows.
There changes are mostly around handling inlined printf by adding stdio or
handling missing functions like gettimeofday. Also some tests require
compiler-rt builtin intrinsics and some needed libcmt.lib or other includes.
pthread usage has been replaced with std thread on windows. A cmake module
is borrowed from llvm-project/cmake/modules to detect the correct builtin
library for the current compiler.
To tests this do following in Visual Studio developer console with CC CXX set to
your test C/C++ compilers:
set CC=c:\\work\\llvm-dev\\build\\bin\\clang-cl.exe
set CXX=c:\\work\\llvm-dev\\build\\bin\\clang-cl.exe
cmake -G Ninja -DTEST_SUITE_SUBDIRS=SingleSource -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF ..\\llvm-test-suite