Skip to content

Commit

Permalink
Set the correct arch for arm64.
Browse files Browse the repository at this point in the history
The triple should use aarch64 instead of arm64.
  • Loading branch information
FtZPetruska committed Jun 6, 2023
1 parent 2dc7942 commit e497ce2
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions cmake/GetTriplet.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function(get_host_triplet triplet)
set(host_arch ${CMAKE_SYSTEM_PROCESSOR})
if(host_arch STREQUAL "x86")
set(host_arch "i686")
endif()
if(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
set(host_arch "i686" PARENT_SCOPE)
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64" PARENT_SCOPE)
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64" PARENT_SCOPE)
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
Expand All @@ -30,10 +31,11 @@ endfunction()
function(get_build_triplet triplet)
set(host_arch ${CMAKE_HOST_SYSTEM_PROCESSOR})
if(host_arch STREQUAL "x86")
set(host_arch "i686")
endif()
if(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
set(host_arch "i686" PARENT_SCOPE)
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64" PARENT_SCOPE)
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64" PARENT_SCOPE)
endif()

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
Expand Down

0 comments on commit e497ce2

Please sign in to comment.