conan
conan copied to clipboard
[feature] Improves AutotoolsToolchain cross-building flow
It would be great to have a better way to enter/change host/build triplets in case of cross-building flow:
if cross_building(self) and is_msvc(self):
# tc.cross_build could contain all the information (like MesonToolchain)
host_arch = tc.cross_build["host"]["arch"]
build_arch = tc.cross_build["build"]["arch"]
# Let's trust that AutotoolsToolchain is getting the correct GNU arch
if host_arch and build_arch:
tc.cross_build["host"]["triplet"] = f"{host_arch}-w64-mingw32"
tc.cross_build["build"]["triplet"] = f"{build_arch}-w64-mingw32"
(very similar to MesonToolchain approach)
Originally posted by @franramirez688 in https://github.com/conan-io/conan-center-index/pull/18058#discussion_r1360383992