This is an archive of the discontinued LLVM Phabricator instance.

Port SingleSource tests to Windows
Needs ReviewPublic

Authored by omjavaid on Jul 27 2023, 4:46 AM.

Details

Reviewers
quic-kirthana
Summary

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

Diff Detail

Event Timeline

omjavaid created this revision.Jul 27 2023, 4:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2023, 4:46 AM
omjavaid requested review of this revision.Jul 27 2023, 4:46 AM