This is an archive of the discontinued LLVM Phabricator instance.

[SPEC2017] Add timeit dependencies to validator and bench binaries.
ClosedPublic

Authored by fhahn on Jul 29 2021, 5:33 AM.

Details

Summary

Both the benchmark and validator binaries require timeit on the host
system to measure the build times. They also need timeit-target, to
measure execution time on the system where the benchmarks execute.

This patch explicitly adds those dependencies, so they are guaranteed to
be built, even if individual benchmark binaries are built.

Diff Detail

Repository
rT test-suite

Event Timeline

fhahn created this revision.Jul 29 2021, 5:33 AM
fhahn requested review of this revision.Jul 29 2021, 5:33 AM

Shouldn't the top-level CMakeLists.txt be responsible to build build-timeit before building anything? This looks like a recursive problem because TEST_SUITE_COLLECT_COMPILE_TIME sets

set(CMAKE_C_COMPILE_OBJECT "${CMAKE_BINARY_DIR}/tools/timeit --summary <OBJECT>.time ${CMAKE_C_COMPILE_OBJECT}")

but that command line is also used to compile timeit.c. How does this even work?

Meinersbur accepted this revision.Jul 29 2021, 2:43 PM

If there are no easy answers to my questions, I'd just approve the patch. At worst we have redundant dependencies to timeit or build it even with though TEST_SUITE_COLLECT_COMPILE_TIME=OFF.

This revision is now accepted and ready to land.Jul 29 2021, 2:43 PM
fhahn added a comment.Jul 29 2021, 2:53 PM

If there are no easy answers to my questions, I'd just approve the patch. At worst we have redundant dependencies to timeit or build it even with though TEST_SUITE_COLLECT_COMPILE_TIME=OFF.

I'm not entirely sure myself. I *think* at least for llvm_test_executable(${PROG} ${_sources}) it should not be needed, because the dependencies should be added elsewhere already. Let me try to reproduce the issue again before continuing.

fhahn added a comment.Jul 30 2021, 7:36 AM

If there are no easy answers to my questions, I'd just approve the patch. At worst we have redundant dependencies to timeit or build it even with though TEST_SUITE_COLLECT_COMPILE_TIME=OFF.

I'm not entirely sure myself. I *think* at least for llvm_test_executable(${PROG} ${_sources}) it should not be needed, because the dependencies should be added elsewhere already. Let me try to reproduce the issue again before continuing.

I ran into the build failure again and I think it is just the validator binary that is missing the dependency. The committed version only adds build-timeit to the validator binary.