-
Notifications
You must be signed in to change notification settings - Fork 990
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] Add support for self.conf_info_target (or propagate self.conf_info only to host context) #14421
Comments
OK, it appears that |
Just to follow up, I haven't abandoned this, I am working on #14441, that includes a fix (not a feature, this would be more like a bug in the computation of |
Sorry, above had wrong link, I have updated it The right PR is #14441, if you would like to test it running from source for your project, that would be great feedback. |
#14441 is merged for next 2.0.10, if you want to give it a try from the |
Sorry for the late answer, I was on vacation for the past 3 weeks. I can confirm that with 2.0.10-dev from the Also, in your PR I see the use of undocumented Also, when is the planned release date for 2.0.10? |
Thanks for the feedback! We are closing 2.0.10 now, hopefully tomorrow is out. Yes, |
What is your suggestion?
I'm writing a tool-requires package that will be part of the profile. The idea of the package is to enforce some compile flags to all packages, regardless if they are internal, or from conan-center.
The rough idea is something like already discussed in this question
For the sake of simplicity, let's say that the recipe looks like this:
Now, let's say we have a simple default profile that looks like this:
Now, let's have a protobuf-like package, that contains both binary and library. Let's call it
my_protobuf
. Let's also say thatmy_protobuf
depends onlibbacktrace/cci.20210118
from the conan center.Now, we install our package in debug mode with following command:
The installation resolves to the following profiles:
Conan correctly concludes that both Release and Debug version of
my_protobuf
andlibbacktrace
needs to be built, however, the problem is that theRelease
version of those packages ends up getting built with-fsanitize=address
, just like the Debug version. This then causes linker issues later and especially if such a package gets uploaded to the Artifactory and used later.The problem is in the line marked above:
self.conf_info.append('tools.build:cflags', cflags)
- this gets propagated to both host and build contexts. For propagating flags just to the build context, I can useself.cpp_info.cflags = cflags
, but I have no way of propagating the flags exclusively to the host context.Ideally, I would like to be able write a recipe like this:
Is such a thing maybe possible even today with conan 2.0.9, but undocumented (just like
settings_target
andsettings_build
exist, but are undocumented)?In general, I think that toolchain packages should have the ability to propagate their flags exclusively to the host context.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: