Build benchmark library with -O2 to inline instrumentation hooks

This commit is contained in:
J. Nick Koston
2026-03-16 22:08:22 -10:00
parent ea5f62f030
commit 93991317c4
+3
View File
@@ -134,6 +134,9 @@ def _write_library_json(
f"-I{core_include}",
f"-I{hooks_include}",
# google benchmark build flags
# -O2 is critical: without it, instrument_hooks_start_benchmark_inline
# doesn't get inlined and shows up as overhead in profiles
"-O2",
"-DNDEBUG",
"-DHAVE_STD_REGEX",
"-DHAVE_STEADY_CLOCK",