Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: suppress clang's -Watomic-alignment warnings on x86_64 (#76)
Running `./dev build` on x86_64 with Clang would by default [1][2] produce about 2200 lines of -Watomic-alignment warnings, like: ../src/hatrack/hash/crown.c:416:25: warning: large atomic operation may incur significant performance penalty; the access size (16 bytes) exceeds the max lock-free size (8 bytes) [-Watomic-alignment] 416 | record = atomic_read(&cur->record); | ^ ../include/hatrack/hatomic.h:35:24: note: expanded from macro 'atomic_read' 35 | #define atomic_read(x) atomic_load_explicit(x, memory_order_relaxed) | ^ /usr/lib/clang/17/include/stdatomic.h:141:30: note: expanded from macro 'atomic_load_explicit' 141 | #define atomic_load_explicit __c11_atomic_load | ^ But it's intentional that we use the emulation where it's not supported in hardware. Suppress those warnings. Closes: #68 [1] https://releases.llvm.org/7.0.0/tools/clang/docs/DiagnosticsReference.html#watomic-alignment [2] https://releases.llvm.org/18.1.8/tools/clang/docs/DiagnosticsReference.html#watomic-alignment
- Loading branch information