From 5a17bd832afeb8fd36df179ee9ad745335635b08 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 12:30:53 +0200 Subject: [PATCH] Add s390x support in a few places in eng/native build scripts (#58366) * Make isMSBuildOnNETCoreSupported return true on s390x (fixes generating version headers) * Add s390x platform-specific library name in find_unwind_libs (enables linking against system-provided libunwind) Co-authored-by: Ulrich Weigand --- eng/native/build-commons.sh | 4 ++-- eng/native/functions.cmake | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index e07b5e0..9600e34 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -27,7 +27,7 @@ isMSBuildOnNETCoreSupported() return fi - if [[ ( "$__HostOS" == "Linux" ) && ( "$__HostArch" == "x64" || "$__HostArch" == "arm" || "$__HostArch" == "armel" || "$__HostArch" == "arm64" ) ]]; then + if [[ ( "$__HostOS" == "Linux" ) && ( "$__HostArch" == "x64" || "$__HostArch" == "arm" || "$__HostArch" == "armel" || "$__HostArch" == "arm64" || "$__HostArch" == "s390x" ) ]]; then __IsMSBuildOnNETCoreSupported=1 elif [[ ( "$__HostOS" == "OSX" || "$__HostOS" == "FreeBSD" ) && "$__HostArch" == "x64" ]]; then __IsMSBuildOnNETCoreSupported=1 @@ -230,7 +230,7 @@ usage() echo "" echo "Common Options:" echo "" - echo "BuildArch can be: -arm, -armel, -arm64, x64, x86, -wasm" + echo "BuildArch can be: -arm, -armel, -arm64, -s390x, x64, x86, -wasm" echo "BuildType can be: -debug, -checked, -release" echo "-os: target OS (defaults to running OS)" echo "-bindir: output directory (defaults to $__ProjectRoot/artifacts)" diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 0d03cc3..66a91ca 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -89,6 +89,10 @@ function(find_unwind_libs UnwindLibs) find_library(UNWIND_ARCH NAMES unwind-x86_64) endif() + if(CLR_CMAKE_HOST_ARCH_S390X) + find_library(UNWIND_ARCH NAMES unwind-s390x) + endif() + if(NOT UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND) set(UNWIND_LIBS ${UNWIND_ARCH}) endif() -- 2.7.4