compilers: Add optimization=plain option#10593
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10593 +/- ##
===========================================
- Coverage 68.84% 50.36% -18.48%
===========================================
Files 406 203 -203
Lines 88000 44085 -43915
Branches 19546 9777 -9769
===========================================
- Hits 60581 22203 -38378
+ Misses 22850 19877 -2973
+ Partials 4569 2005 -2564
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
21f9d0d to
55b99e1
Compare
|
@dcbaker I did say that PR was going to break things... |
|
I mean, it was already broken with clang, which means it was broken for nix with macos anyway, it just got noticed now that gcc and clang have the same behavior :/ |
|
The change makes sense to me anyway. Should we ensure that |
55b99e1 to
a725d49
Compare
a725d49 to
e8405bb
Compare
e8405bb to
7506511
Compare
mesonbuild#9287 changed the `optimization=0` to pass `-O0` to the compiler. This change is reasonable by itself but unfortunately, it breaks `buildtype=plain`, which promises that “no extra build flags are used”. `buildtype=plain` is important for distros like NixOS, which manage compiler flags for optimization and hardening themselves. Let’s introduce a new optimization level that does nothing and set it as the default for `buildtype=plain`.
7506511 to
70663f6
Compare
|
Made the changelog more explicit about the breakage. |
|
Cool. systemd has acknowledged the issue, and is only waiting on this PR to merge before proposing a fix. |
Is this not going to be merged? |
|
Test failure is unrelated. |
meson 0.64 introduced optimization plain option. Ref: systemd/systemd#25677 Ref: mesonbuild/meson#10593
meson 0.64 introduced optimization plain option. Ref: systemd/systemd#25677 Ref: mesonbuild/meson#10593
meson 0.64 introduced optimization plain option. Ref: systemd/systemd#25677 Ref: mesonbuild/meson#10593
#9287 changed the
optimization=0to pass-O0to the compiler. This change is reasonable by itself but unfortunately, it breaksbuildtype=plain, which promises that “no extra build flags are used”.buildtype=plainis important for distros like NixOS, which manage compiler flags for optimization and hardening themselves.Let’s introduce a new optimization level that does nothing and set it as the default for
buildtype=plain.