-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
libc: re-enable benchmarks in post submit ci #119789
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 |
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: