[libcxx-commits] [libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Build Google Benchmark directly from Lit (PR #160367)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 23 11:55:35 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD libcxx/utils/libcxx/test/config.py libcxx/utils/libcxx/test/format.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- format.py 2025-09-23 18:52:07.000000 +0000
+++ format.py 2025-09-23 18:55:10.036861 +0000
@@ -346,19 +346,28 @@
test.getFullName()
),
)
# TODO: %{libcxx-dir} is not a base substitution
# TODO: We're building Google Benchmark for every test, which is super wasteful
- configure = ['cmake', '-S', '%{libcxx-dir}/../third-party/benchmark', '-B', '%T/gbench-build']
- configure += ['-D', 'CMAKE_INSTALL_PREFIX=%T/gbench']
- configure += ['-D', 'CMAKE_CXX_COMPILER=%{cxx}']
- configure += ['-D', 'CMAKE_BUILD_TYPE=Release']
- configure += ['-D', 'CMAKE_CXX_FLAGS="%{flags} %{compile_flags} %{link_flags} -Wno-error"']
- configure += ['-D', 'BENCHMARK_ENABLE_TESTING=OFF']
- configure += ['-D', 'BENCHMARK_ENABLE_WERROR=OFF']
- configure += ['-D', 'BENCHMARK_INSTALL_DOCS=OFF']
- build = ['cmake', '--build', '%T/gbench-build', '--target', 'install']
+ configure = [
+ "cmake",
+ "-S",
+ "%{libcxx-dir}/../third-party/benchmark",
+ "-B",
+ "%T/gbench-build",
+ ]
+ configure += ["-D", "CMAKE_INSTALL_PREFIX=%T/gbench"]
+ configure += ["-D", "CMAKE_CXX_COMPILER=%{cxx}"]
+ configure += ["-D", "CMAKE_BUILD_TYPE=Release"]
+ configure += [
+ "-D",
+ 'CMAKE_CXX_FLAGS="%{flags} %{compile_flags} %{link_flags} -Wno-error"',
+ ]
+ configure += ["-D", "BENCHMARK_ENABLE_TESTING=OFF"]
+ configure += ["-D", "BENCHMARK_ENABLE_WERROR=OFF"]
+ configure += ["-D", "BENCHMARK_INSTALL_DOCS=OFF"]
+ build = ["cmake", "--build", "%T/gbench-build", "--target", "install"]
steps = [
"rm -rf %T/gbench %T/gbench-build",
"%dbg(CONFIGURING GBENCH) " + " ".join(configure),
"%dbg(BUILDING GBENCH) " + " ".join(build),
``````````
</details>
https://github.com/llvm/llvm-project/pull/160367
More information about the libcxx-commits
mailing list