-
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
Meson needs -Dbuildtype=custom
to change the optimisation & debug values
#10487
Comments
I can confirm in
this is still true. I'm testing with a vala project. If buildtype has debug true, valac uses
Doing again with
I'm trying to setup this with an option but looks I need to set two which is annoying: meson.build:
I'm looking for something like:
this try to avoid valac to add #line directives but make c to compile with debug so debug a vala complied code show the real c code. but reading @jpakkane commens on other issues, I think meson cannot change options in meson.build files |
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
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
Overview
According to the documentation you should be able to independently set the optimisation and debug levels by passing
-Debug
and-Doptimization
. However you actually have to pass-Dbuildtype=custom
as well.From the docs:
"For setting optimization levels and toggling debug, you can either set the buildtype option, or you can set the optimization and debug options which give finer control over the same. Whichever you decide to use, the other will be deduced from it. For example, -Dbuildtype=debugoptimized is the same as -Ddebug=true -Doptimization=2 and vice-versa."
"All other combinations of debug and optimization set buildtype to 'custom'"
Steps
Given debug set to true and optimisation set 1
When I check the values
Then I expect buildtype=custom, debug=true, optimisation=1
Environment
The text was updated successfully, but these errors were encountered: