-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--werror doesn't work with -Db_lto=true #7360
Comments
Forgot to mention that it's reproducible with meson-0.54.3. And just in case the full log can be found at https://github.com/systemd/systemd/runs/789680623?check_suite_focus=true (where -Werror was passed with CFLAGS) and at https://github.com/systemd/systemd/runs/789365442?check_suite_focus=true (where |
It appears there is no way to treat warnings as errors using meson. |
With LTO, the linker will re-execute the compiler and various warnings may be emitted. We must therefore pass -Werror to the linker as well when -Werror is enabled to capture these. This is only required / useful with LTO. Closes: mesonbuild#7360 Signed-off-by: Sam James <[email protected]>
With LTO, the linker will re-execute the compiler and various warnings may be emitted. We must therefore pass -Werror to the linker as well when -Werror is enabled to capture these. This is only required / useful with LTO. Closes: mesonbuild#7360 Signed-off-by: Sam James <[email protected]>
With LTO, the linker will re-execute the compiler and various warnings may be emitted. We must therefore pass -Werror to the linker as well when -Werror is enabled to capture these. This is only required / useful with LTO. Closes: mesonbuild#7360 Signed-off-by: Sam James <[email protected]> Signed-off-by: Eli Schwartz <[email protected]>
It appears
-Werror
gets lost somewhere along the way when-Db_lto
is used. For example, systemd/systemd#16224 was discovered by passing-Werror
withCFLAGS
directly.Here's what the command line looks like with
--werror
:and with CFLAGS='-Werror'
The text was updated successfully, but these errors were encountered: