Skip to content
Open
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: 3 additions & 1 deletion eng/RuntimeIdentifier.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- Detect linux flavors using __PortableTargetOS from the native script. -->
<PortableOS Condition="'$(PortableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-musl'">linux-musl</PortableOS>
<PortableOS Condition="'$(PortableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-bionic'">linux-bionic</PortableOS>
<PortableOS Condition="'$(PortableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-ohos'">linux-ohos</PortableOS>

<PortableTargetRid Condition="'$(PortableTargetRid)' == ''">$(PortableOS)-$(TargetArchitecture)</PortableTargetRid>
</PropertyGroup>
Expand Down Expand Up @@ -50,7 +51,8 @@
<TargetsLinux Condition="'$(TargetOS)' == 'linux' or '$(TargetOS)' == 'android'">true</TargetsLinux>
<TargetsLinuxBionic Condition="'$(PortableOS)' == 'linux-bionic'">true</TargetsLinuxBionic>
<TargetsLinuxMusl Condition="'$(PortableOS)' == 'linux-musl'">true</TargetsLinuxMusl>
<TargetsLinuxGlibc Condition="'$(TargetsLinux)' == 'true' and '$(TargetsLinuxMusl)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">true</TargetsLinuxGlibc>
<TargetOpenHarmony Condition="'$(PortableOS)' == 'linux-ohos'">true</TargetOpenHarmony>
<TargetsLinuxGlibc Condition="'$(TargetsLinux)' == 'true' and '$(TargetsLinuxMusl)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and '$(TargetOpenHarmony)' != 'true'">true</TargetsLinuxGlibc>
<TargetsNetBSD Condition="'$(TargetOS)' == 'netbsd'">true</TargetsNetBSD>
<TargetsOSX Condition="'$(TargetOS)' == 'osx'">true</TargetsOSX>
<TargetsMacCatalyst Condition="'$(TargetOS)' == 'maccatalyst'">true</TargetsMacCatalyst>
Expand Down
10 changes: 7 additions & 3 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<SdkToolsSupported Condition="'$(_SdkToolsSupportedOS)' == 'true' and '$(_SdkToolsSupportedArch)' == 'true'">true</SdkToolsSupported>

<_UseNativeAotForComponentsCrossOS Condition="'$(CrossBuild)' == 'true' and '$(_hostArchitecture)' == '$(_targetArchitecture)' and '$(_hostOS)' != 'windows'">true</_UseNativeAotForComponentsCrossOS>
<UseNativeAotForComponents Condition="'$(NativeAotSupported)' == 'true' and ('$(TargetOS)' == '$(HostOS)' or '$(_UseNativeAotForComponentsCrossOS)' == 'true') and '$(TargetsLinuxBionic)' != 'true'">true</UseNativeAotForComponents>
<UseNativeAotForComponents Condition="'$(NativeAotSupported)' == 'true' and ('$(TargetOS)' == '$(HostOS)' or '$(_UseNativeAotForComponentsCrossOS)' == 'true') and '$(TargetsLinuxBionic)' != 'true' and '$(TargetOpenHarmony)' != 'true'">true</UseNativeAotForComponents>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -77,6 +77,9 @@
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true' and '$(CoreCLRSupported)' == 'true' and '$(MonoSupported)' != 'true'">clr+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true' and '$(CoreCLRSupported)' != 'true' and '$(MonoSupported)' == 'true'">clr.nativeaotruntime+clr.nativeaotlibs+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true' and '$(CoreCLRSupported)' != 'true' and '$(MonoSupported)' != 'true'">clr.nativeaotruntime+clr.nativeaotlibs+libs+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOpenHarmony)' == 'true' and '$(CoreCLRSupported)' == 'true' and '$(MonoSupported)' == 'true'">clr.nativeaotruntime+clr.nativeaotlibs+clr+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOpenHarmony)' == 'true' and '$(CoreCLRSupported)' == 'true' and '$(MonoSupported)' != 'true'">clr.nativeaotruntime+clr.nativeaotlibs+clr+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOpenHarmony)' == 'true' and '$(CoreCLRSupported)' != 'true'">clr.nativeaotruntime+clr.nativeaotlibs+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">clr+libs+tools+host+packs</DefaultSubsets>
<!-- In source build, mono is only supported as primary runtime flavor. -->
<DefaultSubsets Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono'">clr+libs+tools+host+packs</DefaultSubsets>
Expand Down Expand Up @@ -384,8 +387,9 @@
-->
<PropertyGroup>
<!-- linux-bionic reports TargetOS as 'linux', so the HostOS/TargetOS check below never fires for it.
It always targets the bionic libc via the NDK though, so host tools must be built separately. -->
<_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(TargetsLinuxBionic)' == 'true' or '$(EnableNativeSanitizers)' != '')">true</_BuildAnyCrossArch>
It always targets the bionic libc via the NDK though, so host tools must be built separately.
linux-ohos (HarmonyOS) similarly reports TargetOS as 'linux' and uses its own NDK toolchain. -->
<_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(TargetsLinuxBionic)' == 'true' or '$(TargetOpenHarmony)' == 'true' or '$(EnableNativeSanitizers)' != '')">true</_BuildAnyCrossArch>
<_BuildCrossComponents Condition="$(_subset.Contains('+clr.crossarchtools+'))">true</_BuildCrossComponents>
<_BuildCrossComponents Condition="'$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')">true</_BuildCrossComponents>
<_CrossBitwidthBuild Condition="'$(BuildArchitecture)' == 'x64' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm')">true</_CrossBitwidthBuild>
Expand Down
11 changes: 8 additions & 3 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ usage()
echo " [Default: Debug]"
echo " --os Target operating system: windows, linux, freebsd, osx, maccatalyst, tvos,"
echo " tvossimulator, ios, iossimulator, android, browser, wasi, netbsd, illumos, solaris"
echo " linux-musl, linux-bionic, tizen, or haiku."
echo " linux-musl, linux-bionic, linux-ohos, tizen, or haiku."
echo " [Default: Your machine's OS.]"
echo " --targetrid <rid> Optional argument that overrides the target rid name."
echo " --projects <value> Project or solution file(s) to build."
Expand Down Expand Up @@ -146,8 +146,9 @@ initDistroRid()
local isCrossBuild="$3"

# Only pass ROOTFS_DIR if __DoCrossArchBuild is specified and the current platform is not an Apple platform (that doesn't use rootfs)
if [[ $isCrossBuild == 1 && "$targetOs" != "osx" && "$targetOs" != "android" && "$targetOs" != "ios" && "$targetOs" != "iossimulator" && "$targetOs" != "tvos" && "$targetOs" != "tvossimulator" && "$targetOs" != "maccatalyst" ]]; then
passedRootfsDir=${ROOTFS_DIR}
# HarmonyOS uses its NDK toolchain, so no rootfs is required either.
if [[ $isCrossBuild == 1 && "$targetOs" != "osx" && "$targetOs" != "android" && "$targetOs" != "ios" && "$targetOs" != "iossimulator" && "$targetOs" != "tvos" && "$targetOs" != "tvossimulator" && "$targetOs" != "maccatalyst" && "${__PortableTargetOS:-}" != "linux-ohos" ]]; then
passedRootfsDir=${ROOTFS_DIR:-}
fi
initDistroRidGlobal "${targetOs}" "${targetArch}" "${passedRootfsDir}"
}
Expand Down Expand Up @@ -310,6 +311,10 @@ while [[ $# -gt 0 ]]; do
os="linux"
__PortableTargetOS=linux-musl
;;
linux-ohos)
os="linux"
__PortableTargetOS=linux-ohos
;;
haiku)
os="haiku" ;;
*)
Expand Down
1 change: 1 addition & 0 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<!-- Set up default live asset paths if no overrides provided. -->
<PropertyGroup>
<CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(CoreCLRConfiguration)'))</CoreCLRArtifactsPath>
<CoreCLRArtifactsPath Condition="'$(TargetOpenHarmony)' == 'true'">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', 'linux-ohos.$(TargetArchitecture).$(CoreCLRConfiguration)'))</CoreCLRArtifactsPath>
<MonoArtifactsPath Condition="'$(MonoArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'mono', '$(TargetOS).$(TargetArchitecture).$(MonoConfiguration)'))</MonoArtifactsPath>
<LibrariesArtifactsPath Condition="'$(LibrariesArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</LibrariesArtifactsPath>
<LibrariesAllConfigurationsArtifactsPath Condition="'$(LibrariesAllConfigurationsArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</LibrariesAllConfigurationsArtifactsPath>
Expand Down
41 changes: 38 additions & 3 deletions eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ initTargetDistroRid()
local passedRootfsDir=""

# Only pass ROOTFS_DIR if cross is specified and the target platform is not Darwin that doesn't use rootfs
if [[ "$__CrossBuild" == 1 && "$platform" != "darwin" ]]; then
if [[ "$__CrossBuild" == 1 && "$platform" != "darwin" && "$__TargetOS" != "linux-ohos" ]]; then
passedRootfsDir="$ROOTFS_DIR"
fi

Expand Down Expand Up @@ -137,6 +137,38 @@ build_native()
echo "Error: Unknown Android architecture $hostArch."
exit 1
fi
elif [[ "$targetOS" == linux-ohos ]]; then
# HarmonyOS (OpenHarmony) NDK-style toolchain. The OHOS NDK provides its
# own CMake toolchain file (ohos.toolchain.cmake) which sets CMAKE_SYSTEM_NAME=OHOS
# and selects the aarch64/arm/x86_64 linux-ohos clang wrappers + sysroot.
if [[ -z "$OHOS_NDK_HOME" ]]; then
echo "Error: You need to set the OHOS_NDK_HOME environment variable pointing to the HarmonyOS NDK root."
exit 1
fi

local ohosToolchainFile="$OHOS_NDK_HOME/native/build/cmake/ohos.toolchain.cmake"
if [[ ! -f "$ohosToolchainFile" ]]; then
echo "Error: OHOS CMake toolchain file not found at $ohosToolchainFile. Verify OHOS_NDK_HOME."
exit 1
fi

cmakeArgs="-DCMAKE_TOOLCHAIN_FILE=$ohosToolchainFile $cmakeArgs"
cmakeArgs="-DOHOS_NDK_HOME=$OHOS_NDK_HOME $cmakeArgs"
cmakeArgs="-C $__RepoRootDir/eng/native/tryrun.cmake $cmakeArgs"

# Don't try to set CC/CXX in init-compiler.sh - it's handled in ohos.toolchain.cmake already
__Compiler="default"

if [[ "$hostArch" == arm64 ]]; then
cmakeArgs="-DOHOS_ARCH=arm64-v8a $cmakeArgs"
elif [[ "$hostArch" == arm ]]; then
cmakeArgs="-DOHOS_ARCH=armeabi-v7a $cmakeArgs"
elif [[ "$hostArch" == x64 ]]; then
cmakeArgs="-DOHOS_ARCH=x86_64 $cmakeArgs"
else
echo "Error: Unknown OHOS architecture $hostArch."
exit 1
fi
elif [[ "$targetOS" == iossimulator ]]; then
cmakeArgs="-C $__RepoRootDir/eng/native/tryrun_ios_tvos.cmake $cmakeArgs"

Expand Down Expand Up @@ -596,6 +628,9 @@ elif [[ "$__TargetOS" == osx || "$__TargetOS" == maccatalyst ]]; then
elif [[ "$__TargetOS" == android ]]; then
# nothing to do here
true
elif [[ "$__TargetOS" == linux-ohos ]]; then
# HarmonyOS uses its NDK toolchain, no rootfs required
true
else
__CMakeArgs="-DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs"
fi
Expand All @@ -604,8 +639,8 @@ fi
if [[ "$__CrossBuild" == 1 ]]; then
CROSSCOMPILE=1
export CROSSCOMPILE
# Darwin that doesn't use rootfs
if [[ -z "$ROOTFS_DIR" && "$platform" != "darwin" ]]; then
# Darwin that doesn't use rootfs; HarmonyOS uses its NDK toolchain
if [[ -z "$ROOTFS_DIR" && "$platform" != "darwin" && "$__TargetOS" != "linux-ohos" ]]; then
ROOTFS_DIR="$__RepoRootDir/.tools/rootfs/$__TargetArch"
export ROOTFS_DIR
fi
Expand Down
17 changes: 17 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,20 @@ if (CLR_CMAKE_HOST_UNIX OR CLR_CMAKE_HOST_WASI)
add_compile_options(-fstack-protector-strong)
endif()

if(CLR_CMAKE_HOST_OPENHARMONY)
# The OHOS NDK toolchain injects --gcc-toolchain (via CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
# which clang reports as unused; silence it (in CMAKE_C_FLAGS so try_compile checks
# inherit it) so -Werror doesn't fail the build. Applies to assembly too.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Qunused-arguments")
# The arm64 asm helpers access t_ThreadStatics/t_runtime_thread_locals via TLS
# descriptors; the C++ definitions must use native (non-emulated) TLS with the
# global-dynamic model to match.
add_compile_options(-fno-emulated-tls)
add_compile_options(-ftls-model=global-dynamic)
endif()

# Suppress warnings-as-errors in release branches to reduce servicing churn
if (PRERELEASE)
add_compile_options(-Werror)
Expand Down Expand Up @@ -845,6 +859,9 @@ if(CLR_CMAKE_TARGET_UNIX)
if(CLR_CMAKE_TARGET_LINUX_MUSL)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_LINUX_MUSL>)
endif()
if(CLR_CMAKE_TARGET_OPENHARMONY)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_OPENHARMONY>)
endif()
if(CLR_CMAKE_TARGET_ANDROID)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_ANDROID>)
endif()
Expand Down
11 changes: 11 additions & 0 deletions eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ set(PRERELEASE 1)
#----------------------------------------
set(CLR_CMAKE_HOST_OS ${CMAKE_SYSTEM_NAME})
string(TOLOWER ${CLR_CMAKE_HOST_OS} CLR_CMAKE_HOST_OS)
# HarmonyOS (OpenHarmony) uses the OHOS NDK CMake toolchain which sets
# CMAKE_SYSTEM_NAME=OHOS. Its libc is musl-based, so treat it as a linux/musl target.
if(CLR_CMAKE_HOST_OS STREQUAL ohos)
set(CLR_CMAKE_HOST_OS linux)
set(CLR_CMAKE_HOST_LINUX_MUSL 1)
set(CLR_CMAKE_HOST_OPENHARMONY 1)
endif()
if(CLR_CMAKE_HOST_OS STREQUAL linux)
set(CLR_CMAKE_HOST_UNIX 1)
if(CLR_CROSS_COMPONENTS_BUILD)
Expand Down Expand Up @@ -357,6 +364,10 @@ if(CLR_CMAKE_HOST_LINUX_MUSL OR CLR_CMAKE_TARGET_OS STREQUAL alpine)
set(CLR_CMAKE_TARGET_LINUX_MUSL 1)
endif(CLR_CMAKE_HOST_LINUX_MUSL OR CLR_CMAKE_TARGET_OS STREQUAL alpine)

if(CLR_CMAKE_HOST_OPENHARMONY)
set(CLR_CMAKE_TARGET_OPENHARMONY 1)
endif()

macro(set_cache_value)
set(${ARGV0} ${ARGV1} CACHE STRING "Result from TRY_RUN" FORCE)
set(${ARGV0}__TRYRUN_OUTPUT "dummy output" CACHE STRING "Output from TRY_RUN" FORCE)
Expand Down
24 changes: 20 additions & 4 deletions eng/native/configuretools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,27 @@ if(NOT WIN32 AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
return()
endif()

# For NDK-style toolchains (HarmonyOS) the compiler lives outside PATH.
# Hint find_program at the compiler's directory so tools like llvm-ar/nm are located.
# Guarded to OHOS only so other platforms keep their existing lookup behavior.
if(CLR_CMAKE_HOST_OPENHARMONY)
get_filename_component(CLR_COMPILER_DIR "${CMAKE_C_COMPILER}" DIRECTORY)
endif()

unset(EXEC_LOCATION_${exec} CACHE)
find_program(EXEC_LOCATION_${exec}
NAMES
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
"${TOOLSET_PREFIX}${exec}")
if(CLR_CMAKE_HOST_OPENHARMONY)
find_program(EXEC_LOCATION_${exec}
NAMES
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
"${TOOLSET_PREFIX}${exec}"
HINTS
"${CLR_COMPILER_DIR}")
else()
find_program(EXEC_LOCATION_${exec}
NAMES
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
"${TOOLSET_PREFIX}${exec}")
endif()

if (required AND EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND")
message(FATAL_ERROR "Unable to find toolchain executable. Name: '${exec}', Prefix: '${TOOLSET_PREFIX}'")
Expand Down
7 changes: 5 additions & 2 deletions eng/native/gen-buildsys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ done
cmake_extra_defines=
if [[ "$CROSSCOMPILE" == "1" ]]; then
platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
# OSX doesn't use rootfs
if ! [[ -n "$ROOTFS_DIR" || "$platform" == "darwin" ]]; then
# OSX doesn't use rootfs; HarmonyOS uses its NDK toolchain
if ! [[ -n "$ROOTFS_DIR" || "$platform" == "darwin" || "$target_os" == "linux-ohos" ]]; then
echo "ROOTFS_DIR not set for crosscompile"
exit 1
fi
Expand All @@ -76,6 +76,9 @@ if [[ "$CROSSCOMPILE" == "1" ]]; then

if [[ "$platform" == "darwin" ]]; then
cmake_extra_defines="$cmake_extra_defines -DCMAKE_SYSTEM_NAME=Darwin"
elif [[ "$target_os" == "linux-ohos" ]]; then
# HarmonyOS NDK toolchain is injected by build-commons.sh; do not override it.
true
else
cmake_extra_defines="$cmake_extra_defines -DCMAKE_TOOLCHAIN_FILE=$scriptroot/../common/cross/toolchain.cmake"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/clr.featuredefines.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
<FeatureXplatEventSource Condition="'$(FeatureXplatEventSource)' == '' AND '$(TargetOS)' == 'linux'">true</FeatureXplatEventSource>
<FeatureXplatEventSource Condition="'$(FeatureXplatEventSource)' == '' AND '$(TargetOS)' == 'linux' AND '$(TargetOpenHarmony)' != 'true'">true</FeatureXplatEventSource>
<FeatureComWrappers>true</FeatureComWrappers>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions src/coreclr/runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<_BuildNativeTargetOS>$(TargetOS)</_BuildNativeTargetOS>
<_BuildNativeTargetOS Condition="'$(TargetsLinuxBionic)' == 'true'">linux-bionic</_BuildNativeTargetOS>
<_BuildNativeTargetOS Condition="'$(TargetOpenHarmony)' == 'true'">linux-ohos</_BuildNativeTargetOS>
<HasCdacBuildTool Condition="'$(ClrFullNativeBuild)' == 'true' or '$(ClrRuntimeSubset)' == 'true' or '$(ClrDebugSubset)' == 'true' or '$(ClrCrossComponentsSubset)' == 'true' or '$(ClrNativeAotSubset)' == 'true'">true</HasCdacBuildTool>
<BuildRuntimeDependsOnTargets>GetPgoDataPackagePath</BuildRuntimeDependsOnTargets>
<BuildRuntimeDependsOnTargets Condition="'$(EnableSourceControlManagerQueries)' == 'true'">$(BuildRuntimeDependsOnTargets);InitializeSourceControlInformationFromSourceControlManager</BuildRuntimeDependsOnTargets>
Expand Down
1 change: 1 addition & 0 deletions src/native/corehost/corehost.proj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

<_CoreHostUnixTargetOS>$(TargetOS)</_CoreHostUnixTargetOS>
<_CoreHostUnixTargetOS Condition="'$(TargetsLinuxBionic)' == 'true'">linux-bionic</_CoreHostUnixTargetOS>
<_CoreHostUnixTargetOS Condition="'$(TargetOpenHarmony)' == 'true'">linux-ohos</_CoreHostUnixTargetOS>
<BuildArgs>$(Configuration) $(TargetArchitecture) -commithash "$([MSBuild]::ValueOrDefault('$(SourceRevisionId)', 'N/A'))" -os $(_CoreHostUnixTargetOS)</BuildArgs>
<BuildArgs>$(BuildArgs) -cmakeargs "-DVERSION_FILE_PATH=$(NativeVersionFile)"</BuildArgs>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/native/libs/System.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else() # WASI
)
endif()

if (CLR_CMAKE_TARGET_APPLE OR CLR_CMAKE_TARGET_ANDROID OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI OR CLR_CMAKE_TARGET_OPENBSD OR CLR_CMAKE_TARGET_HAIKU)
if (CLR_CMAKE_TARGET_APPLE OR CLR_CMAKE_TARGET_ANDROID OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI OR CLR_CMAKE_TARGET_OPENBSD OR CLR_CMAKE_TARGET_HAIKU OR CLR_CMAKE_TARGET_OPENHARMONY)
# These platforms do not support robust mutexes.
# Keep an OS list instead of CMake configure checks since we also need to synchronize this with
# the compile-time guards on the managed code side at
Expand Down
1 change: 1 addition & 0 deletions src/native/libs/build-native.proj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<AssemblyName>.NET Runtime</AssemblyName>
<_BuildNativeTargetOS>$(TargetOS)</_BuildNativeTargetOS>
<_BuildNativeTargetOS Condition="'$(TargetsLinuxBionic)' == 'true'">linux-bionic</_BuildNativeTargetOS>
<_BuildNativeTargetOS Condition="'$(TargetOpenHarmony)' == 'true'">linux-ohos</_BuildNativeTargetOS>
<_BuildNativeOutConfig>$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</_BuildNativeOutConfig>
<_BuildNativeArgs>$(TargetArchitecture) $(Configuration) outconfig $(_BuildNativeOutConfig) -os $(_BuildNativeTargetOS)</_BuildNativeArgs>
<_BuildNativeArgs Condition="'$(EnableNativeSanitizers)' != ''">$(_BuildNativeArgs) -fsanitize=$(EnableNativeSanitizers)</_BuildNativeArgs>
Expand Down
Loading
Loading