-
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
‘optimization’ affects buildtype #5814
Comments
The semantics of buildtype are roughly "if release, set options x, y and z to values a, b and c". You should either set all individual options yourself or just set the build type. This is due to backwards compatibility. If we were to design this from scratch, buildtype would not be a standalone option, just a shortcut to set the other options. |
Thank you for looking into this. I think there are multiple facets to the issue.
Well, the behavior you are describing is a shortcut, just as it should be in my opinion. If release use Now the weird thing is that setting |
Agreed, I just want to change the optimization level from O3 to O2, but the buildtype I think that maybe other opts should affect buildtype, but optimization should not, it's very special. |
As said, that is due to backwards compatibility. But if at all possible do not depend on buildtype, but instead look at specific settings instead. |
This is a first step to make `buildtype` a true alias of `debug` and `optimization` options. See mesonbuild#10808. Relates to: - mesonbuild#11645 - mesonbuild#12096 - mesonbuild#5920 - mesonbuild#5814 - mesonbuild#8220 - mesonbuild#8493 - mesonbuild#9540 - mesonbuild#10487 - mesonbuild#12265 - mesonbuild#8308 - mesonbuild#8214 - mesonbuild#7194 - mesonbuild#11732
This is a first step to make `buildtype` a true alias of `debug` and `optimization` options. See mesonbuild#10808. Relates to: - mesonbuild#11645 - mesonbuild#12096 - mesonbuild#5920 - mesonbuild#5814 - mesonbuild#8220 - mesonbuild#8493 - mesonbuild#9540 - mesonbuild#10487 - mesonbuild#12265 - mesonbuild#8308 - mesonbuild#8214 - mesonbuild#7194 - mesonbuild#11732
This is a first step to make `buildtype` a true alias of `debug` and `optimization` options. See mesonbuild#10808. Relates to: - mesonbuild#11645 - mesonbuild#12096 - mesonbuild#5920 - mesonbuild#5814 - mesonbuild#8220 - mesonbuild#8493 - mesonbuild#9540 - mesonbuild#10487 - mesonbuild#12265 - mesonbuild#8308 - mesonbuild#8214 - mesonbuild#7194 - mesonbuild#11732
By adding a flag to indicate whether an option was explicitly set or not, it is now possible to update the value of `buildtype` from the values of `debug` and `optimization`, without modifying options that are explicitly set. Fixes mesonbuild#11645 Fixes mesonbuild#5814 (maybe this one was already fixed, but at least a test proves it works)
By adding a flag to indicate whether an option was explicitly set or not, it is now possible to update the value of `buildtype` from the values of `debug` and `optimization`, without modifying options that are explicitly set. Fixes mesonbuild#11645 Fixes mesonbuild#5814 (maybe this one was already fixed, but at least a test proves it works)
By adding a flag to indicate whether an option was explicitly set or not, it is now possible to update the value of `buildtype` from the values of `debug` and `optimization`, without modifying options that are explicitly set. Fixes mesonbuild#11645 Fixes mesonbuild#5814 (maybe this one was already fixed, but at least a test proves it works)
By adding a flag to indicate whether an option was explicitly set or not, it is now possible to update the value of `buildtype` from the values of `debug` and `optimization`, without modifying options that are explicitly set. Fixes mesonbuild#11645 Fixes mesonbuild#5814 (maybe this one was already fixed, but at least a test proves it works)
By adding a flag to indicate whether an option was explicitly set or not, it is now possible to update the value of `buildtype` from the values of `debug` and `optimization`, without modifying options that are explicitly set. Fixes mesonbuild#11645 Fixes mesonbuild#5814 (maybe this one was already fixed, but at least a test proves it works)
This is a first step to make `buildtype` a true alias of `debug` and `optimization` options. See mesonbuild#10808. Relates to: - mesonbuild#11645 - mesonbuild#12096 - mesonbuild#5920 - mesonbuild#5814 - mesonbuild#8220 - mesonbuild#8493 - mesonbuild#9540 - mesonbuild#10487 - mesonbuild#12265 - mesonbuild#8308 - mesonbuild#8214 - mesonbuild#7194 - mesonbuild#11732
Here is some behavior which I find very confusing.
Setting
optimization
to 2 disables therelease
buildtype. Even setting it explicitly doesn't help.This also breaks the
if-release
feature. I think the above configuration simply should result in arelease
buildtype with-O2
instead of-O3
.The text was updated successfully, but these errors were encountered: