You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While GnuToolchain has encapsulated some of this complexity (a bit better than AutotoolsToolchain), it is still in incubation and not as flexible as it could be. It would be great if it could handle less common compiler_executables and environment variable pairs, e.g. ranlib, nm, etc. A consistent API for host/build/target context would also be very useful for cross-compilation (target-context compiler info would be useful for recipes like rust without resorting to workarounds).
Perhaps a helper function along the lines of this could be added?
where compiler_executables is queried first, followed by VirtualBuildEnv env vars for env or name.upper() and finally cc/cxx would resort to fallback logic to search the correct paths for the expected compiler executable.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
What is your suggestion?
Quite a few recipes on CCI need to find either CC, CXX, CC_FOR_BUILD, or one of the binutils utilities like
strip
to support legacy build systems:https://github.com/search?q=repo%3Avalgur%2Fconan-center-index+%28%2F%28%3F-i%29%5C%5B%22CC%5B%22_%5D%2F+OR+%2F%28%3F-i%29get%5C%28%22CC%2F+OR+compiler_executables%29+language%3APython&type=code
To do this correctly and reliably, the recipes will have to consider:
tools.build:compiler_executables
VirtualBuildEnv(self).vars().get(...)
compiler=gcc compiler.version=13
->g++-13
See the Boost recipe for an existing example of this: https://github.com/conan-io/conan-center-index/blob/adc93693dcf0e6c66a3d0ebf5a76503f2670ba16/recipes/boost/all/conanfile.py#L1501-L1515
While GnuToolchain has encapsulated some of this complexity (a bit better than AutotoolsToolchain), it is still in incubation and not as flexible as it could be. It would be great if it could handle less common
compiler_executables
and environment variable pairs, e.g. ranlib, nm, etc. A consistent API for host/build/target context would also be very useful for cross-compilation (target-context compiler info would be useful for recipes like rust without resorting to workarounds).Perhaps a helper function along the lines of this could be added?
where
compiler_executables
is queried first, followed by VirtualBuildEnv env vars forenv or name.upper()
and finally cc/cxx would resort to fallback logic to search the correct paths for the expected compiler executable.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: