Repository navigation
build: compile C++ Boost benchmarks with C++14 - #16556
Conversation
Boost.Math, at the 1.92.0 that stdlib now pins, requires C++14, so the C++ benchmarks against Boost no longer build at C++11. This follows the same change to the C++ test fixture runners, and moves the benchmark snippet template and `COMMON_CXXFLAGS` with them. Ref: stdlib-js#16545 Assisted-by: Claude Opus 5.5 --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
|
|
Run affected benchmarks failed compiling |
Looked into the Defining |
Sounds good. Thank you! |
Indeed. See the notes in the benchmark source file. They state that we assume the existence of a C compiler which includes special function extensions, such as the Bessel functions. Ref: https://github.com/stdlib-js/stdlib/blob/648ec0ffd38c2dd003f58355f328f9a189cf6646/lib/node_modules/%40stdlib/math/base/special/besselj0/benchmark/c/benchmark.c#L27C8-L27C81 |
|
As the CI failure is not due to changes introduced in this PR, I'll go ahead and merge. |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Description
This pull request:
benchmark/cpp/boost/Makefile, 42 packages) and their snippet template (tools/snippets/benchmark/cpp/boost/Makefile) from-std=c++11to-std=c++14.COMMON_CXXFLAGSintools/make/common.mkto match.Follow up to #16545 where we moved stdlib's Boost pin to 1.92.0, these benchmarks otherwise wouldn't build as Boost.Math requires C++14, and under C++11 each one warns
"Boost.Math requires C++14"and then fails to compile.Related Issues
No.
Reference Packages
This pull request followed these packages:
benchmark/cpp/boost/.ldexp's C++ benchmark, the only other one, uses no Boost and is left at C++11 (LMK if you want that updated to C++14, too, but it doesn't need to be strictly).Questions
No.
Other
make install-deps-boostinstalls it: 41 of the 42 benchmarks build at-std=c++14with no warnings, and all 41 run and pass. None build at-std=c++11.gamma1pm1's benchmark doesn't build at any Boost version—it callsboost::math::gamma1pm1, and Boost's function istgamma1pm1. I have a separate PR for that, to keep this one focused, and I'll file after this one.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Claude (Opus 5.5) found the Makefiles, made the changes, and checked the builds on macOS. I reviewed the changes and the PR description.
@stdlib-js/reviewers