-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: option to download vc/ucrt debug binaries #148
base: main
Are you sure you want to change the base?
Conversation
|
||
for pkg in manifest.packages { | ||
packages.insert(pkg.id.clone(), pkg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manifest.packages
contains lots of packages which have the same id, the vc debug runtime packages are one example. To prevent overriding packages in the packages map the key needs to be slightly modified for those. I decided to simply append the count of duplicate packages to the key, this doesn't conflict with the current behavior and allows to grab all the packages.
@@ -454,6 +454,7 @@ pub(crate) fn minimize( | |||
SectionKind::SdkLib => (&sdk_lib_prefix, &mut map.sdk.libs), | |||
SectionKind::CrtHeader => (&crt_hdr_prefix, &mut map.crt.headers), | |||
SectionKind::CrtLib => (&crt_lib_prefix, &mut map.crt.libs), | |||
SectionKind::VcrDebug => (&roots.vcrd, &mut map.vcrd.libs), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very uncertain how to handle this as the vcr shouldn't be part of the minimize logic at all. Is there a way to "skip" this ?
This PR adds the opportunity to download and splat the VCR and UCRT debug binaries (eg
vcruntime140d.dll
) by adding the--include-debug-runtime
cli argument.This is useful for testing/debugging debug builds on linux hosts as the debug runtime dlls are not included in wine.
Note
This is my first time coding in rust, I tried to stick to best practices but it would be good to review the changes carefully for code style and performance.
output
The binaries are placed inside
<splat-output-dir>/vcrd/<vcr-version>/bin/<arch>
.Running
xwin --manifest-version 16 --include-debug-runtime splat
createssplat/vcrd/14.29.30157/bin/x86_64
with the debug runtime binaries inside it.The complete list of included binaries can be found in the updated
deterministic__verify_deterministic.snap
.Note
I updated the snapshots for deterministic and compile tests, however I skipped updating the snapshots for compile_minimized because they seem to be outdated on the main branch.
(Implements #81)