Skip to content
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

Add minimize command #101

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Add minimize command #101

merged 5 commits into from
Oct 11, 2023

Conversation

Jake-Shadle
Copy link
Owner

This PR adds a minimize subcommand that performs a splat, followed by running an actual compile for windows (defaults to x86_64-pc-windows-msvc) wrapped in strace so that xwin can detect all file accesses to headers and libraries in the crt and sdk, and writing only those accessed files to a map file. This map file can then be used with a splat to only splat and symlink the files listed in map file.

This results in a vastly smaller splat output eg. from 577 MiB -> 105 MiB for a large internal project that includes a significant amount of C/C++ code.

This also adds a --sdk-version and --crt-version so allow users to explicitly specify the sdk/crt to use, rather than the default behavior of always using the latest version detected in the manifest used. This was primarily done due to some CRT in the latest version required clang 16+, from the previous lowest version being 11, which can be too much of a jump for some people.

Resolves: #85
Resolves: #84
Resolves: #28

@Jake-Shadle Jake-Shadle merged commit 93cc35e into main Oct 11, 2023
8 checks passed
@Jake-Shadle Jake-Shadle deleted the min branch October 11, 2023 17:04
@MarijnS95
Copy link
Contributor

Nice! Don't forget to add it (and the new version flags) to the README though 😬

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.

Add header pruning Add lib pruning Add simple config for symlink creation
2 participants