Closed eli-schwartz closed 1 month ago
Thanks for the report @eli-schwartz. I've opened draft #289 and will try to fix it.
Not surprisingly, I can reproduce this on Manjaro.
Note that in general I would suggest using -flto in CI, not in CMakeLists.txt ;) although the addition of the flags that are pure warning flags can definitely be enforced.
Also: -flto=4 says to use 4 parallel jobs, this is a setting that is well tuned to my laptop but not necessarily anyone else's machine. But I copy-pasted my flags verbatim as part of the report. :P
Note that in general I would suggest using -flto in CI, not in CMakeLists.txt ;)
I was about to ask! I appreciate your suggestion.
So far I've moved the -flto to the CI and the 3 other Werror flags I moved into CMake. Is that what you meant?
Now I'm gonna do some hunting to actually find the problem
So far I've moved the -flto to the CI and the 3 other Werror flags I moved into CMake. Is that what you meant?
Yeah.
I tried to build with the following *FLAGS to optimize the build:
-flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Note the -Werror=* flags are used to help detect cases where the compiler tries to optimize by assuming UB cannot exist in the source code -- if it does exist, ordinarily the code would be miscompiled, and this says to make the miscompilation a fatal error.
I got this error:
Downstream report: https://bugs.gentoo.org/926143 Full build log: build.log