-
Notifications
You must be signed in to change notification settings - Fork 66
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
Explicitly setting a debug build also requires explicitly setting b_ndebug=false #441
Comments
When reporting an issue it is desirable to explicitly state what you are trying to achieve, the solution you tried, how it did not work, preferably corroborated by some evidence. The description of this issue allows us only to guess what you are trying to do and why you thin it does not work as expected. I guess you are trying to obtain a build with debug symbols and with assertions enabled. To achieve that you added [tool.meson-python.args]
setup = ["-Dbuildtype=debug"] However, in your opinion that is not sufficient in enabling assertions (ie compile without the |
Sorry if the initial description wasn’t clear. You’re right that I’d expect the combination of |
How did you verify that? I just tested it and it works as expected, see #442 |
Hmm, I can't seem to reproduce what I was seeing yesterday in my project. Sorry for the noise! I'll try to write a failing test next time I report a bug. |
A complete test is not necessary, however providing a way to reproduce the issue would be nice. |
Glad this is working as expected after all 😅. Choosing defaults has turned out to be tricky enough already. |
Closes mesonbuildgh-461 Closes mesonbuildgh-207 Also xref mesonbuildgh-459 and mesonbuildgh-441 which are already closed but contain discussion relevant to debug builds.
Closes mesonbuildgh-461 Closes mesonbuildgh-207 Also xref mesonbuildgh-459 and mesonbuildgh-441 which are already closed but contain discussion relevant to debug builds.
For whatever reason I need to have
setup = ["-Dbuildtype=debug", "-Db_ndebug=false"]
in mypyproject.toml
, not justsetup = ["-Dbuildtype=debug"]
.I think what's happening is the default meson settings
meson-python
sets all need to be explicitly overriden. If I just pass-Dbuildtype=debug
, themeson setup
commandmeson-python
creates is:So I guess meson-python's settings take precedence because they are explicitly set, but then my custom settings for the build type override that, but since I don't have a custom
ndebug
, the previously setif-release
choice doesn't get reset.Maybe meson-python could check if there is a user-provided
buildtype
and not setndebug
orbuildtype
if so?The text was updated successfully, but these errors were encountered: