[llvm-dev] Consolidating copies of google/benchmark in the repo (Was: Proposal: introduce dependency on abseil when building benchmarks)

Mircea Trofin via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 12 15:09:09 PDT 2021

On Tue, Oct 12, 2021 at 2:13 PM Michael Kruse <llvmdev at meinersbur.de> wrote:

> Am Di., 12. Okt. 2021 um 15:20 Uhr schrieb Mircea Trofin <
> mtrofin at google.com>:
> > One thing that does come to mind, llvm-test-suite can be cloned
> separately from llvm-project/llvm. We'd need to point to llvm (or just
> llvm/utils/benchmark), and require that it be available on bots, for
> example. Does that cause an issue for anyone?
> I like to run the llvm-test-suite with other compilers as well such as
> gcc. It requires LIT, but that can be installed separately
> (https://pypi.org/project/lit/). I would already satisfied if there
> there is a possibility to use alternative sources of google benchmark,
> such as installed by the disto package manager (sudo apt install
> libbenchmark1) or automatically downloaded using CMake:
> include(FetchContent)
> FetchContent_Declare(googlebenchmark
>     GIT_REPOSITORY https://github.com/google/benchmark.git
> )
> FetchContent_MakeAvailable(googlebenchmark)

We can probably have a set of steps we try on the llvm-test-suite to find
the dependency, like:
1 one of: user-specified `benchmark` dir,  user-specified llvm dir, or user
specified directive to 'check installed' or to 'fetch latest'
2 try a heuristic: either ../llvm/utils/benchmark, or, if that's not there,
try fetching it, and if this fails, ok, can't build

Probably looking at ../llvm would 'just work' on the build bots, too?
(meaning, without needing to change buildbot scripts)

> Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211012/32ef2731/attachment.html>

More information about the llvm-dev mailing list