Add linux-ohos (HarmonyOS) build infrastructure - #132953
Open
springmin wants to merge 1 commit into
Open
Conversation
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First PR of the OpenHarmony (HarmonyOS) port series (tracking issue: #132866). This PR adds the build infrastructure for the
linux-ohostarget so the runtime can be cross-built with the HarmonyOS NDK. It is a no-op on all existing platforms: every change is guarded byTargetOpenHarmony(only set when the build targetslinux-ohos), and CI for the standard platform matrix is expected to stay green.Changes
eng/build.sh-os linux-ohos; skip rootfs (NDK-based toolchain)eng/RuntimeIdentifier.propsPortableOS=linux-ohosmapping;TargetOpenHarmonyproperty; exclude fromTargetsLinuxGlibceng/Subsets.propsDefaultSubsetsfor OHOS;UseNativeAotForComponentsexclusion (crossgen2 stays IL, mirrors linux-bionic);_BuildAnyCrossArcheng/liveBuilds.targetslinux-ohoseng/native/build-commons.shOHOS_NDK_HOME,ohos.toolchain.cmake,OHOS_ARCH); rootfs bypasseng/native/configureplatform.cmakeCMAKE_SYSTEM_NAME=OHOSto linux/musl;CLR_CMAKE_HOST_OPENHARMONY/CLR_CMAKE_TARGET_OPENHARMONYeng/native/configurecompiler.cmake-Qunused-arguments, native TLS);TARGET_OPENHARMONYdefine (mirrorsTARGET_ANDROID)eng/native/configuretools.cmakeeng/native/gen-buildsys.shsrc/coreclr/clr.featuredefines.propsFeatureXplatEventSourceon OHOS (no LTTng in sysroot)src/coreclr/runtime.proj,src/native/corehost/corehost.proj,src/native/libs/build-native.proj/.sh_BuildNativeTargetOS=linux-ohos(mirrors linux-bionic)src/native/libs/System.Native/CMakeLists.txtImpact on existing platforms
None.
TargetOpenHarmonyis only defined whenPortableOS == linux-ohos(i.e., when-os linux-ohosis passed). Every guarded condition either adds a new branch or excludes OHOS from an existing condition in a way that is logically equivalent for all other platforms.Validation
clr.native+libs+host+packs -os linux-ohos -arch arm64 --crosscross-build succeeds:0 Warning(s) 0 Error(s).Note
This PR was authored with AI assistance (Copilot/agent tooling) under the repository owner's direction.