|
14 | 14 | # section below). |
15 | 15 |
|
16 | 16 | cmake_minimum_required(VERSION 3.16) |
17 | | -project(Yojimbo VERSION 1.10.1 LANGUAGES C CXX) |
| 17 | +project(Yojimbo VERSION 1.11.0 LANGUAGES C CXX) |
18 | 18 |
|
19 | 19 | option(YOJIMBO_SYSTEM_SODIUM |
20 | 20 | "Link the system-installed libsodium instead of the bundled subset in sodium/" OFF) |
@@ -171,27 +171,21 @@ endif() |
171 | 171 |
|
172 | 172 | # yojimbo's wire arithmetic lives in serialize.h, and serialize's compressed float quantizes |
173 | 173 | # with two DISTINCT roundings on write and on read -- the product must round to float32 before |
174 | | -# the constant is added. A compiler permitted to contract fuses those into a single FMA and |
175 | | -# rounds once, which moves the encoded integer and the decoded float by one ulp. That is a |
176 | | -# change to yojimbo's traffic, not a test-suite detail. |
| 174 | +# the constant is added. The vendored serialize pins those roundings in-source with an |
| 175 | +# optimization barrier, so the compressed-float wire bytes are identical under every |
| 176 | +# -ffp-contract setting. -ffast-math / -Ofast remain unsupported: they license reciprocal |
| 177 | +# approximation and reassociation, which change the wire in ways no barrier can pin. |
177 | 178 | # |
178 | | -# It is architecture-dependent, which is why it stayed hidden: FMA is in the aarch64 baseline |
179 | | -# and absent from the x86-64 one, so the same source and the same flags emit a fused multiply |
180 | | -# add on arm64 and none on amd64. Debian package builds were green on every amd64 leg and red |
181 | | -# on every arm64 leg (mas-bandwidth/yojimbo#332) -- and the green legs were green because of an |
182 | | -# instruction set rather than because the build was right. |
183 | | -# |
184 | | -# So every target here that compiles serialize.h builds strict, exactly as serialize's own |
| 179 | +# Every target here that compiles serialize.h still builds strict, exactly as serialize's own |
185 | 180 | # CMakeLists.txt does for its executables: |
186 | | -# - GCC/Clang: -ffp-contract=off. Not merely "no -ffast-math" -- GCC's default is |
187 | | -# -ffp-contract=fast, which contracts ACROSS statements, and clang's default =on still |
188 | | -# fuses within a single expression. |
| 181 | +# - GCC/Clang: -ffp-contract=off. |
189 | 182 | # - MSVC: /fp:precise, which since VS 2022 does not imply contraction. |
190 | 183 | # |
191 | 184 | # This is Glenn's standing estate policy (2026-08-24): "generally speaking, network libraries |
192 | | -# we work on require -ffp-contract=off". The flag is the floor. It is PRIVATE so nothing leaks |
193 | | -# into consumers' own flags; consumers that compile serialize.h themselves need it too, and |
194 | | -# BUILDING.md states that as a requirement. |
| 185 | +# we work on require -ffp-contract=off" -- belt and braces on top of the in-source barrier, |
| 186 | +# and the certification setting for golden vectors. The flag is PRIVATE so nothing leaks |
| 187 | +# into consumers' own flags; consumers that compile serialize.h themselves set it too, and |
| 188 | +# BUILDING.md states that as policy. |
195 | 189 |
|
196 | 190 | if(MSVC) |
197 | 191 | set(YOJIMBO_STRICT_FP_FLAGS /fp:precise) |
|
0 commit comments