WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
271737
[CMake][GLib] Add a build option to enable recommended optimizations
https://bugs.webkit.org/show_bug.cgi?id=271737
Summary
[CMake][GLib] Add a build option to enable recommended optimizations
Adrian Perez
Reported
2024-03-26 17:26:55 PDT
In
bug #270902
we are introducing compiler flags with compiler+linker optimizations. We would like to have those enabled by default, but allow packagers/distributors to opt-out of our set of “recommended” options. We could call this USE_RECOMMENDED_OPTIMIZATIONS, or similar.
Attachments
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2024-10-31 05:14:40 PDT
From the discussion in
https://github.com/WebKit/WebKit/pull/21785
[...] the build system for Chromium has an option which basically means “I wanna make a production build” which is toggles everything the authors want to have in the official builds. We could rename the USE_CXX_STDLIB_ASSERTIONS to something else like and make it cover a set of recommended hardening options—C++ library assertions would be the first one. I think that could be part of this issue.
Adrian Perez
Comment 2
2024-10-31 05:18:48 PDT
Another comment from the GitHub discuission... not sure if it may be good to split to a separate bug depending on this one, but leaving it here for the sake of having the notes all here: > > Alternatively (or additionally) we can also disable them [the > > "production build" options by default with CMAKE_BUILD_TYPE=None, > > which is the recommended way to go for distributors and lets CMake > > pick only the compiler flags defined in the environment. > > I'm not sure: > > * The WebKit build warns you if the build type is missing, and > forcibly sets it. We would have to change that > * Many major distributors set the build type for all packages to > avoid problems like the above. GNOME uses RelWithDebInfo. I think > Mageia does too. Fedora does not. I'm not sure about Debian. > > Intuitively, the idea sounds good to me though. Setting nice flags > _except_ if you have a "plain" build type seems good and equivalent > to how meson works. It could also work by just using the build type > as input for the default value of a new option.
Michael Catanzaro
Comment 3
2024-10-31 05:47:01 PDT
Discussion regarding hardening flags:
https://github.com/WebKit/WebKit/pull/21785#pullrequestreview-1781881751
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug