Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build test-suite on Windows because of POSIX dependency #45185

Open
ASDenysPetrov opened this issue May 8, 2020 · 0 comments
Open

Comments

@ASDenysPetrov
Copy link
Contributor

ASDenysPetrov commented May 8, 2020

Bugzilla Link 45840
Version 10.0
OS Windows NT
Attachments test-suite build output
CC @RKSimon

Extended Description

Current test-suite documentation https://llvm.org/docs/TestSuiteGuide.html 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
  1. Run
ninja

Output (shortened):

../tools/timeit.c:15:10: fatal error: 'sys/signal.h' file not found
#include <sys/signal.h>
         ^~~~~~~~~~~~~~
1 error generated.
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants