Skip to content

SCons: Enable werror for non-MSVC linkers #109312

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Aug 4, 2025

The werror setting has always enabled warnings-as-errors for the compiler, but the linker has been applied inconsistently. Currently, only MSVC has linker warnings as errors in a universal manner; clang/gcc only enables them for web builds. This PR removes the web-specific implementation, instead applying it at a global level

@Repiteo Repiteo added this to the 4.6 milestone Aug 4, 2025
@Repiteo Repiteo requested a review from a team as a code owner August 4, 2025 18:58
@Repiteo Repiteo marked this pull request as draft August 4, 2025 19:13
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on Fedora 42 + mold from system repositories, it works as expected (with werror=yes). Code looks good to me.

@Repiteo Repiteo force-pushed the scons/linker-werror branch 5 times, most recently from d2480e7 to 8a2fdf7 Compare August 7, 2025 20:52
@Repiteo Repiteo force-pushed the scons/linker-werror branch from 8a2fdf7 to 47fc7fa Compare August 7, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants