-
Notifications
You must be signed in to change notification settings - Fork 987
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
[feature] meson toolchain doesn't support debug built-in option #15408
Comments
Thanks for your suggestion. It doesn't really seem accidental, these are the relevant lines: self._buildtype = {"Debug": "debug", # Note, it is not "'debug'"
"Release": "release",
"MinSizeRel": "minsize",
"RelWithDebInfo": "debugoptimized"}.get(build_type, build_type)
self._b_ndebug = "true" if self._buildtype != "debug" else "false"
# https://mesonbuild.com/Builtin-options.html#core-options
# Do not adjust "debug" if already adjusted "buildtype" So there is a note that if
So it seems that using the
Yes, it would be good to know and understand what is the current expectation and what are the plans for the future. |
Yeah I saw that comment but I don't think it makes sense really - let meson worry about whether the options are sane :) And despite what the meson docs say, I think it does make sense to set both I think they've realised the error of not emitting debuginfo by default for a release build, so like I say whether it makes sense to wait for their changes (some in mesonbuild/meson#12699 I guess) I couldn't say... Hopefully they'll rename the option Thanks |
I understand the intention, but we strongly think Conan shouldn't ignore the tools that is using documentation, but quite the opposite. We try quite hard to respect the "upstream" libraries and tools names, conventions, docs, etc. following as much as possible their guidelines, recommended practices, etc. Because trying to workaround their possible issues, bugs or limitations of such tools within Conan code and integration is bad in our experience, it almost always leads to issues, confusion, more support tickets, maintenance, etc, and we cannot afford that. So yes, I'd definitely prefer to wait for them to stabilize their behavior (and criteria and docs), before doing something in the Conan integration that is explicitly against the current tool documentation, even if we believed it made sense. |
Any chance you could have a rethink? Who knows when meson might be sorted out in a released version (some of those issues are pretty old). Meson's runtime message is:
I.e. it's only a recommendation, and an invalid one (another link: mesonbuild/meson#9540). Just to clarify: I'm not asking for you to change conan's default behaviour here. Whilst I think you should ( For me, one of the nice things about conan is all the customization points that allow working around various foibles - but this one seems intractable. It's not like meson's suggestion of using From the myriad meson issues on the topic, I'd say it's only a matter of time before you have to implement rendering Thanks! PS I looked into my distant memory that it was |
What is your suggestion?
Hi
I'm not sure if this is intentional, but is seems the meson toolchain doesn't support the
debug
(i.e. debug info) built-in option. However, it is in the template:conan/conan/tools/meson/toolchain.py
Line 60 in 35a9d7d
but
MesonToolchain._context()
never returns adebug
property so it's never rendered into the native/cross file, AFAICT.It looks like meson are starting to rework the buildtype/debug(info) options, so even if unintentional maybe you want to wait for those changes? FWIW, for my own purposes I've just hacked
MesonToolchain._context()
to include:such that in my conanfile's
generate()
I canmeson_toolchain._debug = True
. Pretty hacky I'm sure, but at least works for now...Thanks
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: