[libc++] Add scripts to build and test libc++ at a specified commit (#158104)
This is useful to perform historical analyses, bisections or establish a
benchmarking baseline after making some changes on a branch. For
example, one can run benchmarks against `main` and easily compare them
to the results on the current feature branch with:
libcxx/utils/test-at-commit --commit $(git merge-base main HEAD) \
-B build/baseline -- <lit args>
libcxx/utils/libcxx-lit build/candidate <lit args>
libcxx/utils/compare-benchmarks \
<(libcxx/utils/consolidate-benchmarks build/baseline) \
<(libcxx/utils/consolidate-benchmarks build/candidate)
Doing this without these scripts would require checking out the desired
baseline, setting up the build directory and running the tests manually.
With these scripts, this can automatically be automated without dirtying
the current checkout.