Repository navigation
OpenHarmony: NativeAOT and pack integration - #136185
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
dotnet#136194 carries N3/N4/N7/N8/D with device validation. Closed dotnet#135839, dotnet#135840, dotnet#135866 and dotnet#136187 in its favor and replied to am11 on dotnet#136132. Runtime in flight: dotnet#136185, dotnet#136186, dotnet#136194; SDK: dotnet#56732, dotnet#56733.
Rebased pr/ohos-native-robustness onto d267e98 (b3ddf1c, 11 files 123+/9-) and opened the PR. Runtime in flight: dotnet#136185, dotnet#136186, dotnet#136194, dotnet#136198; SDK: dotnet#56732, dotnet#56733.
c2f3dcf to
c70a766
Compare
- target OS: map openharmony to Linux in the shared CommandLineHelpers parser, so crossgen2 and ilc accept the RID without local mappings. - crossgen2/packs: keep the CoreLib and runtime packs ReadyToRun like the other Unix targets; drop the IL-only special case and its pdb dedup workaround. - NativeAOT: use lld and the ohos clang ABI on OpenHarmony, and keep the musl libc flavor in the SingleEntry layout. - packs: add openharmony-arm64/x64 to the local runtime, NativeAOT and apphost pack RID lists, and emit the openharmony portable RID. - ILLink: use the managed NTLM implementation on OpenHarmony.
c70a766 to
7ce2047
Compare
|
All six points are addressed in 7ce2047: openharmony is mapped to Linux in the shared Note This comment was drafted with AI assistance (agent tooling) under the author's direction. |
Enabled R2R for the OpenHarmony CoreLib/runtime packs, added the shared openharmony->Linux mapping, removed the local crossgen2 mappings and the unneeded comments, and switched the linker condition to _targetOS. Head 7ce2047 (6 files 25+/6-); all six inline threads answered.
Reverting the OpenHarmony TFM special casing leaves an empty diff; the standard TargetOS TFM path works like FreeBSD. Replied to jkotas and closed the PR. Runtime in flight: dotnet#136185, dotnet#136194, dotnet#136198.
applied Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…iler.SingleEntry.targets applied Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Update the existing KnownAppHostPack entry with the local RIDs and version instead of removing it, and scope ResolvedRuntimePack to the target RID for every OS; only the Include fallback remains for SDKs without the entry.
|
Updated in 127135f: the apphost pack uses Note This reply was drafted with AI assistance (agent tooling) under the author's direction. |
Use _LocalAppHostRuntimeIdentifiers for the runtime, NativeAOT, ILCompiler, Crossgen2 and apphost lists. The property holds the union of the local RIDs; extra RIDs in a list are harmless.
The SDK's Mono KnownRuntimePack already lists wasi-wasm, so the update that appended it is no longer needed. Keep the framework reference update, whose SDK list still omits wasi-wasm.
The shared local list includes OpenHarmony RIDs, which are CoreCLR/NativeAOT only; using it for the Mono runtime pack makes the Mono build fail. Keep the Mono-specific list (with wasi-wasm added) and use the shared list in the framework reference update.
…phost update Move the KnownFrameworkReference update below its include and give the KnownAppHostPack update the same identity/TFM filter as the framework reference update.
|
There is still a build break on Mono: |
Summary
Wire the
openharmony-*RIDs through the NativeAOT, crossgen2, pack andILLink build paths: map openharmony to Linux in the shared target-OS parser,
keep the CoreLib and runtime packs ReadyToRun like the other Unix targets, use
the NDK's
lldandohosABI, keep the musl libc flavor in the SingleEntrylayout, list the RIDs in the local pack graphs, and select the managed NTLM
implementation.
Changes
src/coreclr/tools/Common/CommandLineHelpers.cs: acceptopenharmonyandmap it to
TargetOS.Linux, same asandroid.src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets:select
lldfor openharmony, setCrossCompileAbitoohos(
aarch64-linux-ohos), and skipSystem.Net.Security.Native(nogssapi/krb5 in the sysroot).
.../Microsoft.DotNet.ILCompiler.SingleEntry.targets: keep the musl libcflavor for openharmony; the target OS name is accepted through the shared
mapping.
eng/targetingpacks.targets: addopenharmony-arm64andopenharmony-x64to the local runtime, NativeAOT and apphost RID lists; replace the
SDK-provided apphost pack entry with the local one; scope the
ResolvedRuntimePacklocal-pack override to the target RID on OpenHarmony.src/native/eventpipe/ds-portable-rid.c: reportopenharmonyasPORTABLE_RID_OS..../Microsoft.NET.ILLink.targets: use the managed NTLM implementation onOpenHarmony (no GSSAPI/krb5 in the sysroot), like linux-bionic.
Impact
existing linux, android/bionic, Apple and BSD paths are unchanged.
there is no IL-only special case.
on the Mono-labelled pack: the port is CoreCLR+NativeAOT.
the RIDs.
Test
openharmony-arm64: crossgen2 accepts--targetos openharmony(mapped to Linux) and the CoreLib/runtime pack areReadyToRun.
openharmony-arm64: ilc invokes the NDK clang with--target=aarch64-linux-ohosand links withlld; the SingleEntry layoutuses the musl libc flavor.
openharmony-arm64: runtime, apphost and ILCompilerartifacts are produced, and the
ResolvedRuntimePackoverride is scoped tothe target RID.
openharmony-*RID selects the managed NTLM implementation.Note
This PR was authored with AI assistance (agent tooling) under the author's direction.