cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

`msvc-crt-static = false` has no effect

Open CramBL opened this issue 1 year ago • 0 comments

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 https://github.com/axodotdev/cargo-dist/blob/b96f4b7d6f3e9e5c36e25b08a63306df83d8893f/cargo-dist/src/build/cargo.rs#L94
  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                         │
└────────────────────┴───────────────────────────────────┘

CramBL avatar Mar 02 '25 14:03 CramBL