Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)"
Expand Down
4 changes: 4 additions & 0 deletions eng/native/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ function(find_unwind_libs UnwindLibs)
find_library(UNWIND_ARCH NAMES unwind-x86_64)
endif()

if(CLR_CMAKE_HOST_ARCH_S390X)
Copy link
Member

@am11 am11 Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a nit: based on the condition on callsite if (CLR_CMAKE_USE_SYSTEM_LIBUNWIND), this is unused on platforms that use the in-tree libunwind (like linux-s390x).

If you would revert it, please leave a # comment on top of this function to make it clearer for future reader.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, actually if you intentionally want to use system libunwind, then you can pass ./build.sh -cmakeargs CLR_CMAKE_USE_SYSTEM_LIBUNWIND=1 or ./build.sh --portable=false. nvm, disregard please. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. This is just to allow that use case.

find_library(UNWIND_ARCH NAMES unwind-s390x)
endif()

if(NOT UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND)
set(UNWIND_LIBS ${UNWIND_ARCH})
endif()
Expand Down