Skip to content

Consume cDac package and other cleanup #5482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mikem8361
Copy link

Create a InstallNativePackages.proj that downloads the native diasymreader and cdac packages

Add InstallNativePackages to native-prereqs.proj

Move the native binary copies out of the build.sh/build-native.cmd scripts to the appropriate managed project

Move the rest of the binary copying from the cmake files to the managed projects

Switch the Windows native builds to use ninja. Add the -msbuild/-ninja build-native.cmd options.

@mikem8361 mikem8361 requested a review from hoyosjs May 13, 2025 19:01
@mikem8361 mikem8361 self-assigned this May 13, 2025
@mikem8361 mikem8361 requested a review from a team as a code owner May 13, 2025 19:01
@mikem8361
Copy link
Author

@hoyosjs I'll still except and apply any feedback you have for this PR.

@mikem8361
Copy link
Author

mikem8361 commented May 19, 2025

I can't see the failure details anymore. How do other outside dev's figure out the failure details?

Mike McLaughlin added 2 commits May 29, 2025 09:38
Create a InstallNativePackages.proj that downloads the native diasymreader and cdac packages

Add InstallNativePackages to native-prereqs.proj

Move the native binary copies out of the build.sh/build-native.cmd scripts to the appropriate managed project

Move the rest of the binary copying from the cmake files to the managed projects

Switch the Windows native builds to use ninja. Add the -msbuild/-ninja build-native.cmd options.
@@ -5,6 +5,9 @@
cmake_minimum_required(VERSION 3.15)

cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default.
if(CLR_CMAKE_HOST_WIN32)
cmake_policy(SET CMP0177 NEW) # install() paths are normalized
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Any reason no to normalize everywhere

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to stop the warning on Windows. It is fine on other build platforms

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen it in newer linux versions of the containers.

@hoyosjs hoyosjs closed this Jun 18, 2025
@hoyosjs hoyosjs reopened this Jun 18, 2025
<PropertyGroup Condition="'$(TargetRid)' == ''">
<TargetRidOS>$(TargetOS)</TargetRidOS>
<TargetRidOS Condition="'$(TargetOS)' == 'Windows_NT'">win</TargetRidOS>
<TargetRid>$(TargetRidOS)-$(TargetArch)</TargetRid>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this give us linux-x64 on musl? I remember mike having to use this for a case, but not sure if it's doing what's expected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't apparently break obviously since it gets funneled down from buildnative. This does mean something like dotnet build <project> won't work in linux-musl

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TargetRid is set by the build native script so yes dotnet build <project> doesn't work. This does assume everything is built with our build.sh/build.ps1 scripts.

<!--
Copies all the native binaries to a rid-specific directory under the output and publish paths.
-->
<Target Name="InstallNativeFiles" AfterTargets="Build">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely should be pulled out to sos-packaging.targets. Another question is - what's using them from the publish sub directory? It's not a regular publish since this would break given it's just depending on build. This also means incrementality might be broken - After/Before always run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When -bundletools is set on CI, I think we'll publish single file. I suspect that's why.

@@ -133,6 +133,9 @@ jobs:
- _TestArgs: '-test'
- _Cross: ''

- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- _buildLog: '-binaryLog'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just inline this to the call after CI unconditionally. It's arguably a bug in arcade (win always produces unless we exclude, and linux only if you include)

@hoyosjs hoyosjs enabled auto-merge (squash) July 4, 2025 02:13
@hoyosjs hoyosjs disabled auto-merge July 4, 2025 02:43
@hoyosjs
Copy link
Member

hoyosjs commented Jul 4, 2025

Looking at the official build - we are not carrying the cDAC for musl. Also, this increases install size from ~21mb to ~84mb. Each linux cDAC is 12mb. Is this expected?

@hoyosjs
Copy link
Member

hoyosjs commented Jul 4, 2025

There's also none for win-x86, linux-arm

-rw-r--r--@ 1 juhoyosa  staff   3.3M Jul  4  2025 ./tools/net8.0/any/win-x64/mscordaccore_universal.dll
-rw-r--r--@ 1 juhoyosa  staff   3.3M Jul  4  2025 ./tools/net8.0/any/win-arm64/mscordaccore_universal.dll
-rw-r--r--@ 1 juhoyosa  staff    17M Jul  4  2025 ./tools/net8.0/any/osx-x64/libmscordaccore_universal.dylib
-rw-r--r--@ 1 juhoyosa  staff    16M Jul  4  2025 ./tools/net8.0/any/osx-arm64/libmscordaccore_universal.dylib
-rw-r--r--@ 1 juhoyosa  staff    12M Jul  4  2025 ./tools/net8.0/any/linux-x64/libmscordaccore_universal.so
-rw-r--r--@ 1 juhoyosa  staff    12M Jul  4  2025 ./tools/net8.0/any/linux-arm64/libmscordaccore_universal.so

So we are still missing about 50mb of payload, effectively 6x of what was there.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 4, 2025

Also - we probably also want these in the SOS transport packages. Like sos.installhelpers

@steveisok
Copy link
Member

There's also none for win-x86, linux-arm

It wasn't ready back when this PR was created. They are now and dotnet/runtime#117321 will fix that.

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.

3 participants