meson: build checksums with extra optimization flags.
authorJeff Davis <[email protected]>
Tue, 9 Sep 2025 23:04:04 +0000 (16:04 -0700)
committerJeff Davis <[email protected]>
Tue, 9 Sep 2025 23:04:04 +0000 (16:04 -0700)
Use -funroll-loops and -ftree-vectorize when building checksum.c to
match what autoconf does.

Missed backport of 9af672bcb2, noticed by Nathan Bossart.

Reported-by: Nathan Bossart <[email protected]>
Discussion: https://postgr.es/m/a81f2f7ef34afc24a89c613671ea017e3651329c[email protected]
Reviewed-by: Andres Freund <[email protected]>
Backpatch-through: 16

src/backend/storage/page/meson.build

index c3e4a805862a97240168ebf4aee2b1648df93160..112f00ff36552287757be6706570ed2b26643edd 100644 (file)
@@ -1,7 +1,15 @@
 # Copyright (c) 2022-2025, PostgreSQL Global Development Group
 
+checksum_backend_lib = static_library('checksum_backend_lib',
+  'checksum.c',
+  dependencies: backend_build_deps,
+  kwargs: internal_lib_args,
+  c_args: vectorize_cflags + unroll_loops_cflags,
+)
+
+backend_link_with += checksum_backend_lib
+
 backend_sources += files(
   'bufpage.c',
-  'checksum.c',
   'itemptr.c',
 )