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

msvc-crt-static = false has no effect #1782

Open
CramBL opened this issue Mar 2, 2025 · 0 comments
Open

msvc-crt-static = false has no effect #1782

CramBL opened this issue Mar 2, 2025 · 0 comments

Comments

@CramBL
Copy link
Contributor

CramBL commented Mar 2, 2025

Hi, there's some issue with how you build the config graph.

Supplying a dist.toml with

[dist]
msvc-crt-static = false

Has no effect. No matter the value.

Reproduce

On windows with dist 0.28.0

  1. cargo new foo
  2. Set authors and repository in Cargo.toml
  3. git commit -am "initial"
  4. dist init and click through defaults
  5. dist init build --allow-dirt --print=linkage

You will get this output

┌────────────────────┬──────────────────────────────────┐
│ Category           ┆ Libraries                        │
╞════════════════════╪══════════════════════════════════╡
│ System             ┆                                  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Homebrew           ┆                                  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Public (unmanaged) ┆                                  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Frameworks         ┆                                  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Other              ┆ KERNEL32.dll                     │
│                    ┆ api-ms-win-core-synch-l1-2-0.dll │
│                    ┆ ntdll.dll                        │
└────────────────────┴──────────────────────────────────┘
  1. Add msvc-crt-static = false at the end of dist-workspace.toml as described in the docs

You get the same output

  1. Change this line to always evaluate to false
    if self.inner.config.builds.cargo.msvc_crt_static
  2. dist init build --allow-dirt --print=linkage

Output:

┌────────────────────┬───────────────────────────────────┐
│ Category           ┆ Libraries                         │
╞════════════════════╪═══════════════════════════════════╡
│ System             ┆                                   │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Homebrew           ┆                                   │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Public (unmanaged) ┆                                   │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Frameworks         ┆                                   │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Other              ┆ KERNEL32.dll                      │
│                    ┆ VCRUNTIME140.dll                  │
│                    ┆ api-ms-win-core-synch-l1-2-0.dll  │
│                    ┆ api-ms-win-crt-heap-l1-1-0.dll    │
│                    ┆ api-ms-win-crt-locale-l1-1-0.dll  │
│                    ┆ api-ms-win-crt-math-l1-1-0.dll    │
│                    ┆ api-ms-win-crt-runtime-l1-1-0.dll │
│                    ┆ api-ms-win-crt-stdio-l1-1-0.dll   │
│                    ┆ ntdll.dll                         │
└────────────────────┴───────────────────────────────────┘
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

No branches or pull requests

1 participant