def _get_host_build_target_flags(self): """Based on google search for build/host triplets, it could need a lot and complex verification""" arch_detected = detected_architecture() or platform.machine() os_detected = detected_os() or platform.system() if self._os_target and self._arch_target: try: target = get_gnu_triplet(self._os_target, self._arch_target, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) target = None else: target = None if os_detected is None or arch_detected is None or self._arch is None or self._os is None: return False, False, target if not cross_building(self._conanfile.settings, os_detected, arch_detected): return False, False, target try: build = get_gnu_triplet(os_detected, arch_detected, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) build = None try: host = get_gnu_triplet(self._os, self._arch, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) host = None return build, host, target
def _get_host_build_target_flags(self): """Based on google search for build/host triplets, it could need a lot and complex verification""" if self._os_target and self._arch_target: try: target = get_gnu_triplet(self._os_target, self._arch_target, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) target = None else: target = None if self._os_build is None or self._arch_build is None or self._arch_host is None or self._os_host is None: return False, False, target if not cross_building(self._conanfile, self._os_build, self._arch_build): return False, False, target try: build = get_gnu_triplet(self._os_build, self._arch_build, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) build = None try: host = get_gnu_triplet(self._os_host, self._arch_host, self._compiler) except ConanException as exc: self._conanfile.output.warn(str(exc)) host = None return build, host, target
def triplet_name(self): # we only need the autotool class to generate the host variable autotools = AutoToolsBuildEnvironment(self) # construct path using platform name, e.g. usr/lib/arm-linux-gnueabihf/pkgconfig # if not cross-compiling it will be false. In that case, construct the name by hand return autotools.host or get_gnu_triplet( str(self.settings.os), str(self.settings.arch), self.settings.get_safe("compiler"))