set __ExtraCmakeArgs="-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
pushd "%__CrossCompIntermediatesDir%"
- call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs!
+ call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% %__BuildOS% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd
set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
pushd "%__IntermediatesDir%"
- call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
+ call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__BuildOS% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd
-#!/usr/bin/env bash
+#!/bin/sh
#
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
#
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
-if [[ "$#" -lt 3 ]]; then
+if [ -z "$build_arch" ] || [ -z "$compiler" ]; then
echo "Usage..."
- echo "init-compiler.sh <script directory> <Architecture> <compiler>"
- echo "Specify the script directory."
+ echo "build_arch=<ARCH> compiler=<NAME> init-compiler.sh"
echo "Specify the target architecture."
echo "Specify the name of compiler (clang or gcc)."
exit 1
fi
-nativescriptroot="$1"
-build_arch="$2"
-compiler="$3"
-
case "$compiler" in
clang*|-clang*|--clang*)
# clangx.y or clang-x.y
version="$(echo "$compiler" | tr -d '[:alpha:]-=')"
- parts=(${version//./ })
- majorVersion="${parts[0]}"
- minorVersion="${parts[1]}"
- if [[ -z "$minorVersion" && "$majorVersion" -le 6 ]]; then
+ majorVersion="${version%%.*}"
+ [ -z "${version##*.*}" ] && minorVersion="${version#*.}"
+
+ if [ -z "$minorVersion" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -le 6 ]; then
minorVersion=0;
fi
compiler=clang
gcc*|-gcc*|--gcc*)
# gccx.y or gcc-x.y
version="$(echo "$compiler" | tr -d '[:alpha:]-=')"
- parts=(${version//./ })
- majorVersion="${parts[0]}"
- minorVersion="${parts[1]}"
+ majorVersion="${version%%.*}"
+ [ -z "${version##*.*}" ] && minorVersion="${version#*.}"
compiler=gcc
;;
esac
cxxCompiler="$compiler++"
-. "$nativescriptroot"/../pipeline-logging-functions.sh
-
# clear the existing CC and CXX from environment
CC=
CXX=
LDFLAGS=
-if [[ "$compiler" == "gcc" ]]; then cxxCompiler="g++"; fi
+if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi
check_version_exists() {
desired_version=-1
echo "$desired_version"
}
-if [[ -z "$CLR_CC" ]]; then
+if [ -z "$CLR_CC" ]; then
# Set default versions
- if [[ -z "$majorVersion" ]]; then
+ if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
- if [[ "$compiler" == "clang" ]]; then versions=( 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
- elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi
-
- for version in "${versions[@]}"; do
- parts=(${version//./ })
- desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")"
- if [[ "$desired_version" != "-1" ]]; then majorVersion="${parts[0]}"; break; fi
+ if [ "$compiler" = "clang" ]; then versions="15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
+ elif [ "$compiler" = "gcc" ]; then versions="12 11 10 9 8 7 6 5 4.9"; fi
+
+ for version in $versions; do
+ _major="${version%%.*}"
+ [ -z "${version##*.*}" ] && _minor="${version#*.}"
+ desired_version="$(check_version_exists "$_major" "$_minor")"
+ if [ "$desired_version" != "-1" ]; then majorVersion="$_major"; break; fi
done
- if [[ -z "$majorVersion" ]]; then
+ if [ -z "$majorVersion" ]; then
if command -v "$compiler" > /dev/null; then
- if [[ "$(uname)" != "Darwin" ]]; then
- Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
+ if [ "$(uname)" != "Darwin" ]; then
+ echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH."
fi
CC="$(command -v "$compiler")"
CXX="$(command -v "$cxxCompiler")"
else
- Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
+ echo "No usable version of $compiler found."
exit 1
fi
else
- if [[ "$compiler" == "clang" && "$majorVersion" -lt 5 ]]; then
- if [[ "$build_arch" == "arm" || "$build_arch" == "armel" ]]; then
+ if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
+ if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
if command -v "$compiler" > /dev/null; then
- Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
+ echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
CC="$(command -v "$compiler")"
CXX="$(command -v "$cxxCompiler")"
else
- Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
+ echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
exit 1
fi
fi
fi
else
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
- if [[ "$desired_version" == "-1" ]]; then
- Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
+ if [ "$desired_version" = "-1" ]; then
+ echo "Could not find specific version of $compiler: $majorVersion $minorVersion."
exit 1
fi
fi
- if [[ -z "$CC" ]]; then
+ if [ -z "$CC" ]; then
CC="$(command -v "$compiler$desired_version")"
CXX="$(command -v "$cxxCompiler$desired_version")"
- if [[ -z "$CXX" ]]; then CXX="$(command -v "$cxxCompiler")"; fi
+ if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler")"; fi
fi
else
- if [[ ! -f "$CLR_CC" ]]; then
- Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
+ if [ ! -f "$CLR_CC" ]; then
+ echo "CLR_CC is set but path '$CLR_CC' does not exist"
exit 1
fi
CC="$CLR_CC"
CXX="$CLR_CXX"
fi
-if [[ -z "$CC" ]]; then
- Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
+if [ -z "$CC" ]; then
+ echo "Unable to find $compiler."
exit 1
fi
# Only lld version >= 9 can be considered stable. lld doesn't support s390x.
-if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 && "$build_arch" != "s390x" ]]; then
+if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
LDFLAGS="-fuse-ld=lld"
fi
scan_build=scan-build
fi
- nextCommand="\"$__RepoRootDir/eng/native/gen-buildsys.sh\" \"$cmakeDir\" \"$intermediatesDir\" $hostArch $__Compiler $__BuildType \"$generator\" $scan_build $cmakeArgs"
+ nextCommand="\"$__RepoRootDir/eng/native/gen-buildsys.sh\" \"$cmakeDir\" \"$intermediatesDir\" $hostArch $targetOS $__Compiler $__BuildType \"$generator\" $scan_build $cmakeArgs"
echo "Invoking $nextCommand"
eval $nextCommand
popd
else
cmake_command=cmake
- if [[ "$build_arch" == "wasm" ]]; then
+ if [[ "$build_arch" == "wasm" && "$__TargetOS" == "Browser" ]]; then
cmake_command="emcmake cmake"
echo "Executing $cmake_command --build \"$intermediatesDir\" --target $target -- -j $__NumProc"
$cmake_command --build "$intermediatesDir" --target $target -- -j "$__NumProc"
echo "-gccx.y: optional argument to build using gcc version x.y."
echo "-ninja: target ninja instead of GNU make"
echo "-numproc: set the number of build processes."
+ echo "-outputrid: optional argument that overrides the target rid name."
echo "-portablebuild: pass -portablebuild=false to force a non-portable build."
echo "-skipconfigure: skip build configuration."
echo "-keepnativesymbols: keep native/unmanaged debug symbols."
__TargetOS=$os
__HostOS=$os
__BuildOS=$os
+__OutputRid=''
# Get the number of processors available to the scheduler
platform="$(uname)"
__TargetArch=wasm
;;
+ outputrid|-outputrid)
+ if [[ -n "$2" ]]; then
+ __OutputRid="$2"
+ shift
+ else
+ echo "ERROR: 'outputrid' requires a non-empty option argument"
+ exit 1
+ fi
+ ;;
+
ppc64le|-ppc64le)
__TargetArch=ppc64le
;;
# init the target distro name
initTargetDistroRid
+
+if [ -z "$__OutputRid" ]; then
+ __OutputRid="$(echo $__DistroRid | tr '[:upper:]' '[:lower:]')"
+fi
list(JOIN CLR_LINK_SANITIZERS "," CLR_LINK_SANITIZERS_OPTIONS)
list(APPEND CLR_SANITIZE_LINK_OPTIONS "-fsanitize=${CLR_LINK_SANITIZERS_OPTIONS}")
- # -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
# -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
- add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
+ add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;-O1>")
add_linker_flag("${CLR_SANITIZE_LINK_OPTIONS}" DEBUG CHECKED)
# -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
add_linker_flag("-Wl,--gc-sections" DEBUG CHECKED)
add_definitions(-DHOST_ARM)
elseif (CLR_CMAKE_HOST_ARCH_ARMV6)
set(ARCH_HOST_NAME armv6)
+ add_definitions(-DHOST_ARM)
add_definitions(-DHOST_ARMV6)
elseif (CLR_CMAKE_HOST_ARCH_ARM64)
set(ARCH_HOST_NAME arm64)
# src/coreclr/vm/stackingallocator.h. It is a false-positive, fixed in g++ 12.
# see: https://github.com/dotnet/runtime/pull/69188#issuecomment-1136764770
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-placement-new>)
+
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-class-memaccess>)
endif()
if (CMAKE_CXX_COMPILER_ID)
# We mark the function which needs exporting with DLLEXPORT
add_compile_options(-fvisibility=hidden)
+
+ # Separate functions so linker can remove them.
+ add_compile_options(-ffunction-sections)
# Specify the minimum supported version of macOS
# Mac Catalyst needs a special CFLAG, exclusive with mmacosx-version-min
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
add_compile_options(-arch x86_64)
else()
clr_unknown_arch()
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_ILLUMOS>)
endif()
endif()
+elseif(CLR_CMAKE_TARGET_WASI)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_WASI>)
+elseif(CLR_CMAKE_TARGET_BROWSER)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_BROWSER>)
else(CLR_CMAKE_TARGET_UNIX)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_WINDOWS>)
endif(CLR_CMAKE_TARGET_UNIX)
set(CLR_CMAKE_HOST_BROWSER 1)
endif(CLR_CMAKE_HOST_OS STREQUAL Emscripten)
+if(CLR_CMAKE_TARGET_OS STREQUAL Wasi)
+ set(CLR_CMAKE_HOST_WASI 1)
+endif(CLR_CMAKE_TARGET_OS STREQUAL Wasi)
+
#--------------------------------------------
# This repo builds two set of binaries
# 1. binaries which execute on target arch machine
elseif(CLR_CMAKE_HOST_BROWSER)
set(CLR_CMAKE_HOST_ARCH_WASM 1)
set(CLR_CMAKE_HOST_ARCH "wasm")
+elseif(CLR_CMAKE_HOST_WASI)
+ set(CLR_CMAKE_HOST_ARCH_WASM 1)
+ set(CLR_CMAKE_HOST_ARCH "wasm")
elseif(CLR_CMAKE_HOST_UNIX_MIPS64)
set(CLR_CMAKE_HOST_ARCH_MIPS64 1)
set(CLR_CMAKE_HOST_ARCH "mips64")
set(CLR_CMAKE_TARGET_BROWSER 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL Emscripten)
+if(CLR_CMAKE_TARGET_OS STREQUAL Wasi)
+ set(CLR_CMAKE_TARGET_WASI 1)
+endif(CLR_CMAKE_TARGET_OS STREQUAL Wasi)
+
if(CLR_CMAKE_TARGET_UNIX)
if(CLR_CMAKE_TARGET_ARCH STREQUAL x64)
set(CLR_CMAKE_TARGET_UNIX_AMD64 1)
endif(CLR_CMAKE_TARGET_UNIX)
# check if host & target os/arch combination are valid
-if (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS)
- if(NOT(CLR_CMAKE_TARGET_ARCH STREQUAL CLR_CMAKE_HOST_ARCH))
- if(NOT((CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM64) OR (CLR_CMAKE_HOST_ARCH_I386 AND CLR_CMAKE_TARGET_ARCH_ARM) OR (CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM) OR (CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_I386)))
- message(FATAL_ERROR "Invalid platform and target arch combination TARGET_ARCH=${CLR_CMAKE_TARGET_ARCH} HOST_ARCH=${CLR_CMAKE_HOST_ARCH}")
- endif()
- endif()
-else()
+if (NOT (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS))
if(NOT (CLR_CMAKE_HOST_OS STREQUAL windows))
message(FATAL_ERROR "Invalid host and target os/arch combination. Host OS: ${CLR_CMAKE_HOST_OS}")
endif()
set __IntermediatesDir=%2
set __VSVersion=%3
set __Arch=%4
+set __Os=%5
set __CmakeGenerator=Visual Studio
set __UseEmcmake=0
if /i "%__Ninja%" == "1" (
if /i "%__Arch%" == "wasm" (
- if "%EMSDK_PATH%" == "" (
- if not exist "%__repoRoot%src\mono\wasm\emsdk" (
- echo Error: Should set EMSDK_PATH environment variable pointing to emsdk root.
- exit /B 1
+ if "%__Os%" == "" (
+ echo Error: Please add target OS parameter
+ exit /B 1
+ )
+ if /i "%__Os%" == "Browser" (
+ if "%EMSDK_PATH%" == "" (
+ if not exist "%__repoRoot%src\mono\wasm\emsdk" (
+ echo Error: Should set EMSDK_PATH environment variable pointing to emsdk root.
+ exit /B 1
+ )
+
+ set EMSDK_PATH=%__repoRoot%src\mono\wasm\emsdk
+ set EMSDK_PATH=!EMSDK_PATH:\=/!
)
- set EMSDK_PATH=%__repoRoot%src\mono\wasm\emsdk
- set EMSDK_PATH=!EMSDK_PATH:\=/!
+ set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_TOOLCHAIN_FILE=!EMSDK_PATH!/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
+ set __UseEmcmake=1
+ )
+ if /i "%__Os%" == "wasi" (
+ echo Error: WASI build not implemented on Windows yet
+ exit /B 1
)
-
- set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_TOOLCHAIN_FILE=!EMSDK_PATH!/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
- set __UseEmcmake=1
) else (
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_SYSTEM_VERSION=10.0"
)
:loop
-if [%5] == [] goto end_loop
-set __ExtraCmakeParams=%__ExtraCmakeParams% %5
+if [%6] == [] goto end_loop
+set __ExtraCmakeParams=%__ExtraCmakeParams% %6
shift
goto loop
:end_loop
:USAGE
echo "Usage..."
- echo "gen-buildsys.cmd <path to top level CMakeLists.txt> <path to location for intermediate files> <VSVersion> <arch>"
+ echo "gen-buildsys.cmd <path to top level CMakeLists.txt> <path to location for intermediate files> <VSVersion> <arch> <os>"
echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
echo "Specify the VSVersion to be used - VS2017 or VS2019"
EXIT /B 1
if [[ "$#" -lt 4 ]]; then
echo "Usage..."
- echo "gen-buildsys.sh <path to top level CMakeLists.txt> <path to intermediate directory> <Architecture> <compiler> [build flavor] [ninja] [scan-build] [cmakeargs]"
+ echo "gen-buildsys.sh <path to top level CMakeLists.txt> <path to intermediate directory> <Architecture> <Os> <compiler> [build flavor] [ninja] [scan-build] [cmakeargs]"
echo "Specify the path to the top level CMake file."
echo "Specify the path that the build system files are generated in."
echo "Specify the host architecture (the architecture the built tools should run on)."
fi
host_arch="$3"
-compiler="$4"
+target_os="$4"
+compiler="$5"
if [[ "$compiler" != "default" ]]; then
nativescriptroot="$( cd -P "$scriptroot/../common/native" && pwd )"
- source "$nativescriptroot/init-compiler.sh" "$nativescriptroot" "$host_arch" "$compiler"
+ build_arch="$host_arch" compiler="$compiler" . "$nativescriptroot/init-compiler.sh"
CCC_CC="$CC"
CCC_CXX="$CXX"
generator="Unix Makefiles"
__UnprocessedCMakeArgs=""
-for i in "${@:5}"; do
+for i in "${@:6}"; do
upperI="$(echo "$i" | tr "[:lower:]" "[:upper:]")"
case "$upperI" in
# Possible build types are DEBUG, CHECKED, RELEASE, RELWITHDEBINFO.
fi
if [[ "$host_arch" == "wasm" ]]; then
- cmake_command="emcmake $cmake_command"
+ if [[ "$target_os" == "Browser" ]]; then
+ cmake_command="emcmake $cmake_command"
+ elif [[ "$target_os" == "wasi" ]]; then
+ true
+ else
+ echo "target_os was not specified"
+ exit 1
+ fi
fi
# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
initNonPortableDistroRid "${targetOs}" "${buildArch}" "${isPortable}" "${rootfsDir}"
if [ "$buildArch" = "wasm" ]; then
- __DistroRid=browser-wasm
- export __DistroRid
+ if [ "$targetOs" = "Browser" ]; then
+ __DistroRid=browser-wasm
+ export __DistroRid
+ elif [ "$targetOs" = "wasi" ]; then
+ __DistroRid=wasi-wasm
+ export __DistroRid
+ fi
fi
if [ -z "${__DistroRid}" ]; then
distroRid="android-$buildArch"
elif [ "$targetOs" = "Browser" ]; then
distroRid="browser-$buildArch"
+ elif [ "$targetOs" = "wasi" ]; then
+ distroRid="wasi-$buildArch"
elif [ "$targetOs" = "FreeBSD" ]; then
distroRid="freebsd-$buildArch"
elif [ "$targetOs" = "illumos" ]; then
)
:VSMissing
-echo %__MsgPrefix%Error: Visual Studio 2019 or 2022 with C++ tools required. ^
+echo %__MsgPrefix%Error: Visual Studio 2022 with C++ tools required. ^
Please see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md for build requirements.
exit /b 1
set(CLR_CMAKE_TARGET_OS SunOS)
elseif(EXISTS /System/Library/CoreServices)
set(DARWIN 1)
+elseif(EXISTS ${CROSS_ROOTFS}/etc/tizen-release)
+ set(TIZEN 1)
endif()
if(DARWIN)
set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
- set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0)
+ set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!")
endif()
-elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86)$" OR FREEBSD OR ILLUMOS)
+elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86)$" OR FREEBSD OR ILLUMOS OR TIZEN)
set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 0)
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0)
set_cache_value(HAVE_SET_MAX_VARIABLE 1)
set_cache_value(HAVE_FULLY_FEATURED_PTHREAD_MUTEXES 1)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
+ elseif (TIZEN)
+ set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
endif()
else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, armv6, arm64, loongarch64, s390x, ppc64le and x86 are supported!")