Skip to content

Build universal DBI from mirrored runtime source - #6159

Merged
max-charlamb merged 12 commits into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/build-universal-dbi
Oct 28, 2026
Merged

max-charlamb merged 12 commits into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/build-universal-dbi

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • build mscordbi_universal directly from the mirrored dotnet/runtime source instead of consuming Microsoft.DotNet.Cdac.Transport
  • remove the transport package download and its six RID-specific dependency-flow entries from diagnostics
  • keep the DBI in a separate CMake graph so its Unix build retains a private runtime PAL
  • integrate the source build with the existing Windows and Unix native build orchestration and copy the DBI and symbols into the normal diagnostics native output
  • use the mirrored runtime snapshot's CMake try_run cache when cross-compiling the DBI
  • align glibc Linux DBI builds with runtime's current cross images and static libc++/libstdc++ ABI configuration

The standalone CMake entry point reproduces the runtime PAL, debug, and DLL directory scopes while excluding unrelated PAL products. It does not include CoreCLR's in-process crash-report implementation because universal DBI has no crash-report callers.

The runtime source closure is maintained separately by the automated mirror. #6162 updated the mirror to runtime commit 9f06f271b8aa0cbb073b2bb6f85b16da576e6eaa, including the full debugger source closure needed by this build.

The resulting Windows and Linux DBI compiler commands match the normal dotnet/runtime universal DBI build after normalizing source, intermediate, object, PDB, and dependency-file paths.

Validation

  • clean integrated Windows x64 Debug native build passed:
    • .\build.cmd -skipmanaged -architecture x64 -configuration Debug
    • universal DBI completed all 200 clean build steps
    • built and installed mscordbi_universal.dll SHA256 hashes matched
  • Linux x64 cross-style Debug configure and build passed under WSL:
    • configured through diagnostics' cross toolchain with the mirrored runtime tryrun.cmake
    • universal DBI completed all 342 build steps
    • produced libmscordbi_universal.so and libmscordbi_universal.so.dbg
  • verified the original Linux cross configuration fails with the same HAVE_CLOCK_THREAD_CPUTIME_EXITCODE error reported by CI, while the updated configuration succeeds
  • Linux old-system-header compatibility build passed:
    • forced an <elf.h> without EM_RISCV and a <linux/membarrier.h> without the private expedited command identifiers
    • CMake detected the missing identifiers and supplied their stable ELF and Linux UAPI values
    • aotminipal and mscordbi_universal completed all 364 build steps
  • Linux current-system-header control build passed:
    • both capability checks succeeded
    • neither compatibility definition was emitted
    • aotminipal and mscordbi_universal completed all 362 build steps
  • Linux x64 build passed in the exact updated CI container:
    • azurelinux-3.0-net10.0-cross-amd64
    • ./build.sh -skipmanaged -cross -architecture x64 -configuration Debug
    • full diagnostics native build completed, including cxxexception.cpp and libmscordbi_universal.so
  • Linux arm64 build passed in the exact updated CI container:
    • azurelinux-3.0-net10.0-cross-arm64
    • ./build.sh -skipmanaged -cross -architecture arm64 -configuration Debug
    • full diagnostics native cross build completed, including cxxexception.cpp and libmscordbi_universal.so
  • Linux-musl x64 build passed in its existing CI container:
    • libc++ settings were correctly excluded based on the linux-musl-x64 target RID
    • full diagnostics native build completed, including libmscordbi_universal.so
  • Windows x64 Debug runtime CoreCLR and universal DBI build passed:
    • cmake --build artifacts\obj\coreclr\windows.x64.Debug --target coreclr mscordbi_universal
  • Linux x64 Release runtime CoreCLR and universal DBI build passed:
    • cmake --build artifacts/obj/coreclr/linux.x64.Release --target coreclr mscordbi_universal
  • Windows compile comparison: 179 runtime commands, 179 diagnostics commands, zero semantic differences
  • Linux compile comparison: 329 runtime commands, 329 diagnostics commands; all remaining compile commands are unchanged from the previously equivalent graphs
  • runtime and diagnostics universal DBI graphs contain zero crash-report commands; runtime CoreCLR retains all seven
  • Linux runtime and diagnostics target graphs contain zero LTTng event-provider commands
  • diagnostics contains no remaining Microsoft.DotNet.Cdac.Transport or CdacTransport references
  • all 1,926 mirrored runtime files are tracked, with zero ignored or untracked snapshot files
  • all 1,926 mirrored blobs exactly match runtime commit 9f06f271b8aa0cbb073b2bb6f85b16da576e6eaa
  • git diff --check passed for the authored PR changes

Note

This pull request description was generated with GitHub Copilot.

@max-charlamb
max-charlamb requested a review from a team as a code owner October 27, 2026 13:52
Max Charlamb and others added 2 commits October 27, 2026 09:53
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Mirror the current runtime DBI closure, reproduce the runtime PAL, debug, and DLL CMake scopes, and exclude the unrelated PAL event provider from the standalone graph.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
@max-charlamb
max-charlamb marked this pull request as draft October 27, 2026 13:55
The universal DBI does not use CoreCLR's in-process crash reporting. Remove the mirrored implementation and keep it out of the standalone DBI build graph.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
@max-charlamb
max-charlamb force-pushed the dev/max-charlamb/build-universal-dbi branch from bdb5c5b to 29dfc64 Compare October 27, 2026 14:06
Max Charlamb added 9 commits October 27, 2026 10:15
Universal DBI is built from mirrored runtime source, so diagnostics no longer consumes the runtime-specific cDAC transport packages.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
The repository-wide Debug ignore rule excluded the DBI debugger implementation and PAL debug source from source-sync commits. Narrowly unignore the manifest-owned paths and add the missing files.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Bring in the automated runtime source update and the merged Debug ignore cleanup.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Load the mirrored runtime snapshot's CMake probe results when configuring universal DBI as a cross build. This keeps PAL try_run values aligned with the runtime sources and avoids executing target probes on the build host.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Detect whether the cross-build kernel headers define the private expedited membarrier commands. Supply their stable Linux UAPI values for minipal when older diagnostics root filesystems do not provide them.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 6297d10c-2f94-48bb-b897-bc0b3e1a855f
@max-charlamb
max-charlamb marked this pull request as ready for review October 27, 2026 20:12
@max-charlamb
max-charlamb merged commit 79d313f into dotnet:main Oct 28, 2026
25 checks passed
@max-charlamb
max-charlamb deleted the dev/max-charlamb/build-universal-dbi branch October 28, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants