[libc-commits] [PATCH] D122481: [NFC][libc] Disable benchmarks when the LLVM benchmark target is not available
Guoxiong Li via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Mar 25 08:19:36 PDT 2022
lgxbslgx added a comment.
I tried this patch locally and got the error message like https://discourse.llvm.org/t/error-when-building-llvm-libc-with-gcc/4166 instead of `The target "benchmark" does not exist.`.
It means this patch can solve the issue.
But I am still confused: why the conditional statement `if(LLVM_INCLUDE_BENCHMARKS)` can solve this issue?
Accoding to the following document and configuration, the `LLVM_INCLUDE_BENCHMARKS` is default to `ON`.
The `LLVM_INCLUDE_BENCHMARKS` is `ON`, so the `if(LLVM_INCLUDE_BENCHMARKS)` seems not neccesary.
I am a newbie in llvm project and may miss something. Thanks for your help.
> Generate build targets for the LLVM benchmarks. Defaults to ON.
option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits