-
Notifications
You must be signed in to change notification settings - Fork 13.2k
libc: re-enable benchmarks in post submit ci #119789
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
Comments
@llvm/issue-subscribers-libc Author: Nick Desaulniers (nickdesaulniers)
As a result of
llvm/llvm-zorg#325 The cmake option
I was able to fix this via: diff --git a/libc/benchmarks/CMakeLists.txt b/libc/benchmarks/CMakeLists.txt
index 60f522d7d8c6..8dae3ea94a20 100644
--- a/libc/benchmarks/CMakeLists.txt
+++ b/libc/benchmarks/CMakeLists.txt
@@ -100,7 +100,7 @@ target_include_directories(libc-benchmark
)
target_link_libraries(libc-benchmark
PUBLIC
- benchmark::benchmark
+ benchmark
LLVMSupport
LLVMTargetParser
Threads::Threads (Not sure if that's correct?). We can then configure the build, but diff --git a/libc/benchmarks/CMakeLists.txt b/libc/benchmarks/CMakeLists.txt
index 60f522d7d8c6..ccdb00459c8a 100644
--- a/libc/benchmarks/CMakeLists.txt
+++ b/libc/benchmarks/CMakeLists.txt
@@ -96,11 +96,11 @@ add_library(libc-benchmark
)
target_include_directories(libc-benchmark
- PUBLIC ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}
+ PUBLIC ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/libc/benchmarks/google-benchmark-libc/include/
)
target_link_libraries(libc-benchmark
PUBLIC
- benchmark::benchmark
+ benchmark
LLVMSupport
LLVMTargetParser
Threads::Threads and then we fail to find llvm/ADT/ArrayRef.h. It turns out, llvm-project/libc/benchmarks/LibcBenchmark.h depends on llvm/ADT/ArrayRef.h and llvm/ADT/SmallVector.h. That was surprising. To ensure llvm-libc doesn't have dependencies on LLVM itself, we should move the benchmark code to use our cpp::array and cpp::vector. Until then, I'm just going to remove |
Thx for tracking this down @nickdesaulniers. Benchmarks were created at the beginning of the project and we didn't have the |
Getting pretty far down this rabbit hole but it seems that googlemock and googletest in llvm-project/third-party/ are themselves tightly coupled to using |
@gchatelet do you recall what libc/benchmarks/JSON.cpp is used for? |
It was used by the python script for analysis.
Another possibility is to drop benchmarking completely and rely on fleetbench's libc suite. Fleetbench has been designed after |
As a result of
llvm/llvm-zorg#325
llvm/llvm-zorg#342
The cmake option
-DLIBC_INCLUDE_BENCHMARKS=ON
now fails to build when usingllvm-projects/runtimes/
as the cmake root.I was able to fix this via:
(Not sure if that's correct?). We can then configure the build, but
ninja libc-benchmark-test
fails because it can't find the headers. Ok, fixed with:and then we fail to find llvm/ADT/ArrayRef.h. It turns out, llvm-project/libc/benchmarks/LibcBenchmark.h depends on llvm/ADT/ArrayRef.h and llvm/ADT/SmallVector.h.
That was surprising. To ensure llvm-libc doesn't have dependencies on LLVM itself, we should move the benchmark code to use our cpp::array and cpp::vector. Until then, I'm just going to remove
-DLIBC_INCLUDE_BENCHMARKS=ON
andninja libc-benchmark-test
from post submit to unblock the fullbuild builders. cc @gchateletThe text was updated successfully, but these errors were encountered: