[libgpg-error] fix arm64 build | [configure_make] fix arm host detection (#30490)

* [vcpkg_configure_make] Do not use dfferent names arm64

* Trigger Build

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
autoantwort 2023-04-19 23:35:20 +02:00 committed by GitHub
parent 73efe03638
commit a0a828827b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,24 +35,28 @@ macro(z_vcpkg_determine_autotools_target_cpu out_var)
endif()
endmacro()
macro(z_vcpkg_set_arch_mac out_var value)
# Better match the arch behavior of config.guess
# See: https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
if("${value}" MATCHES "^(ARM|arm)64$")
set(${out_var} "aarch64")
else()
set(${out_var} "${value}")
endif()
endmacro()
macro(z_vcpkg_determine_autotools_host_arch_mac out_var)
set(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}")
z_vcpkg_set_arch_mac(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}")
endmacro()
macro(z_vcpkg_determine_autotools_target_arch_mac out_var)
list(LENGTH VCPKG_OSX_ARCHITECTURES osx_archs_num)
if(osx_archs_num EQUAL 0)
set(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}")
z_vcpkg_set_arch_mac(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}")
elseif(osx_archs_num GREATER_EQUAL 2)
set(${out_var} "universal")
else()
# Better match the arch behavior of config.guess
# See: https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
if(VCPKG_OSX_ARCHITECTURES MATCHES "^(ARM|arm)64$")
set(${out_var} "aarch64")
else()
set(${out_var} "${VCPKG_OSX_ARCHITECTURES}")
endif()
z_vcpkg_set_arch_mac(${out_var} "${VCPKG_OSX_ARCHITECTURES}")
endif()
unset(osx_archs_num)
endmacro()