<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Unable to build test-suite on Windows because of POSIX dependency"
href="https://bugs.llvm.org/show_bug.cgi?id=45840">45840</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Unable to build test-suite on Windows because of POSIX dependency
</td>
</tr>
<tr>
<th>Product</th>
<td>Test Suite
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Programs Tests
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dpetrov@accesssoftek.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23464" name="attach_23464" title="test-suite build output">attachment 23464</a> <a href="attachment.cgi?id=23464&action=edit" title="test-suite build output">[details]</a></span>
test-suite build output
Current test-suite documentation <a href="https://llvm.org/docs/TestSuiteGuide.html">https://llvm.org/docs/TestSuiteGuide.html</a> does
not describe setup process for Windows platforms, especially from the build
step. I have tryed to fix it going down through build logs in console but new
errors were appearing. It is unable to setup environment properly now.
Mainly the reason is that the main measurement source file
"..test-suite\tools\timeit.c" depends from POSIX includes like <sys/resource.h>
My suggestions would be to rewrite `timeit.c` in a cross-platform way.
Steps top reproduce:
1. Get test-suite from GitHub according to documentation
2. Run
mkdir test-suite-build
cd test-suite-build
cmake \
-DCMAKE_C_COMPILER=<full path to llvm build>/bin/clang.exe \
-DTEST_SUITE_HOST_CC=<full path to llvm build>/bin/clang.exe \
-DCMAKE_LINKER=<full path to llvm build>/bin/lld.exe \
-C../test-suite/cmake/caches/O0.cmake
3. Run
ninja
Output (shortened):
../tools/timeit.c:15:10: fatal error: 'sys/signal.h' file not found
#include <sys/signal.h>
^~~~~~~~~~~~~~
1 error generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>