Release warning are not handled.
context
This issue has been discovered here
After passing the build mode in ci from Debug
to Release
the pipelines stopped working.
I discovered that no ran in Release
mode ever. Hence the flags-DWERROR=1
&-DCMAKE_BUILD_TYPE=Release
never ran together in CI.
what happens when you run in release mode
Release mode says that all programs run that trigger O2
(or O3
idk) optimizations. Lot of optimization do not work which make the program fail.
Most issues are begign. The prominent one is inline
functions that cannot be inlined
by the compiler.
The inlining fail for 2 reasons :
- Functions/strucs to inline are too big
- Functions/structs to inline have a complex signature : either too long (kward for logging or with std containers).
Inlining failure causes a warning which causes an error (bc of -Werror
).
Since previously all C++ pipelines were executed in Debug
* none of these optimizations were executed which lead to no warning.
* except python build jobs which compiles in Release
BUT with -DWERROR=0
TL;DR
As of now we are shipping Debug packages. But that soon we will be shipping in release with lots of warnings.
We need to clear all warnings and re-enable -DWERROR=1
flag.
Actions to do :
Remove all Release warnings of each repository to allow re-enabling the -DWERROR=1 options in CI. To do for each repository :
- Compile with
-DCMAKE_BUILD_TYPE=Release
and-DWERROR=1
- Correct all mentionned warnings
⚠ repeat for windows as there are a lot of un handled warning on the windows side that consistently slow down the compilation
In gitlab-shared-files ci files : Re-enable the -DWERROR=1 flag for each cmake configuration call.