[libcxx] [libcxxabi] [libunwind] [libc++] Build GoogleBenchmark directly from Lit (PR #224192)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 22 23:48:46 PDT 2026
zeroomega wrote:
Digging into this patch further and apparently this commit attempt to run cmake without specify CMAKE_MAKE_PROGRAM and by default it looks like cmake attempts to use GNU make?
We are seeing errors:
```
llvm-lit: /b/s/w/ir/x/w/github-zeroomega-llvm-project/libcxx/utils/libcxx/test/googlebenchmark.py:190: note: Configuring GoogleBenchmark in /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/__gbench__/5d3442c8c915f193/build
llvm-lit: /b/s/w/ir/x/w/github-zeroomega-llvm-project/libcxx/utils/libcxx/test/googlebenchmark.py:158: fatal: Failed to configure GoogleBenchmark.
Command was:
/b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/cmake/518460e722b69442cbcafd00ccc34507cc00bd17e228c9c1c5ea52aa55507a08/bin/cmake -S /b/s/w/ir/x/w/github-zeroomega-llvm-project/third-party/benchmark -B /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/__gbench__/5d3442c8c915f193/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/b/s/w/ir/x/w/llvm_build/bin/clang++ '-DCMAKE_CXX_FLAGS=-pthread --target=x86_64-unknown-linux-gnu -nostdinc++ -I /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/c++/v1 -I /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/x86_64-unknown-linux-gnu/c++/v1 -I /b/s/w/ir/x/w/github-zeroomega-llvm-project/libcxx/test/support -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wno-stringop-overread -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -flax-vector-conversions=none -D_LIBCPP_ENABLE_EXPERIMENTAL -Wuser-defined-warnings -nostdlib++ -L /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test-suite-install/lib/x86_64-unknown-linux-gnu' '-DCMAKE_EXE_LINKER_FLAGS=-lc++experimental -lc++ -lc++abi' -DCMAKE_INSTALL_PREFIX=/b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/__gbench__/5d3442c8c915f193/install -DCMAKE_INSTALL_LIBDIR=lib '-DBENCHMARK_CXX_LIBRARIES=c++experimental;c++;c++abi' -DBENCHMARK_ENABLE_TESTING=OFF -DBENCHMARK_ENABLE_WERROR=OFF -DBENCHMARK_INSTALL_DOCS=OFF
Output was:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
```
IIUC without `CMAKE_MAKE_PROGRAM` specified, cmake by default will use UNIX GNU make. This is wrong. If libcxx test needs to run cmake, it should inherit the arguments from the parent LLVM config. Not blindly trying things from host. Could you revert this change and addresses these issues?
https://github.com/llvm/llvm-project/pull/224192
More information about the cfe-commits
mailing list