Skip to content
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

fix the arch_host naming for armv8 (-> aarch64) #14362

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conan/tools/cmake/toolchain/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@ def _get_cross_build(self):
if hasattr(self._conanfile, "settings_build"):
os_host = self._conanfile.settings.get_safe("os")
arch_host = self._conanfile.settings.get_safe("arch")
arch_host = {"armv8": "aarch64"}.get(arch_host, arch_host)

if system_name is None: # Try to deduce
_system_version = None
_system_processor = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_cross_build():
toolchain = client.load("conan_toolchain.cmake")

assert "set(CMAKE_SYSTEM_NAME Linux)" in toolchain
assert "set(CMAKE_SYSTEM_PROCESSOR armv8)" in toolchain
assert "set(CMAKE_SYSTEM_PROCESSOR aarch64)" in toolchain


def test_cross_build_linux_to_macos():
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_cross_arch():
toolchain = client.load("conan_toolchain.cmake")

assert "set(CMAKE_SYSTEM_NAME Linux)" in toolchain
assert "set(CMAKE_SYSTEM_PROCESSOR armv8)" in toolchain
assert "set(CMAKE_SYSTEM_PROCESSOR aarch64)" in toolchain


def test_no_cross_build_arch():
Expand Down