Bug 246520 - [libpas] libpas is unconditionally built with -Werror
Summary: [libpas] libpas is unconditionally built with -Werror
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-14 07:35 PDT by Michael Catanzaro
Modified: 2022-10-14 13:24 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2022-10-14 07:35:31 PDT
Currently libpas is built with -Werror. This is not OK because it's used unconditionally, so it's enabled in release tarballs. This has been considered bad practice for a very long time because it's likely to cause spurious build failures for anyone not using the exact same compiler version tested by the developers.

It's OK to use -Werror, but only an opt-in basis. We need to make sure it gets enabled only for developers and never for normal builds. We already have a DEVELOPER_MODE_FATAL_WARNINGS flag for this purpose, but it only works for stuff that uses WEBKIT_FRAMEWORK, WEBKIT_EXECUTABLE, or WEBKIT_WRAP_EXECUTABLE, and it looks like libpas does not use any of that. I guess libpas is avoiding use of WebKit macros in case we want to split it out from WebKit's source tree in the future, so that it can be used by other projects? If so, I suppose we cannot look at DEVELOPER_MODE_FATAL_WARNINGS. Adding a libpas-specific flag to opt-in to fatal warnings separate from DEVELOPER_MODE_FATAL_WARNINGS doesn't sound very appealing to me, but it's an option. For now, I will just remove -Werror to get us into a reasonable state. libpas maintainers can decide their preference for else to enable fatal warnings. Just setting CXXFLAGS=-Werror seems entirely reasonable to me, though. ;)
Comment 1 Michael Catanzaro 2022-10-14 07:38:53 PDT
libpas also uses -Wall, so in addition to existing warnings getting stricter, there will also be completely new warnings in the future that will break the build, which we cannot anticipate today.
Comment 2 Michael Catanzaro 2022-10-14 07:42:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5375
Comment 3 EWS 2022-10-14 13:23:52 PDT
Committed 255548@main (0d78e3342b26): <https://commits.webkit.org/255548@main>

Reviewed commits have been landed. Closing PR #5375 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2022-10-14 13:24:20 PDT
<rdar://problem/101184428>