-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Inquiry] Inconsistent binary size with 'cargo +stable build' vs 'cargo +1.50-x86_64-pc-windows-msvc' ? #82188
Comments
This is unlikely to be a Cargo issue so I've transferred this to the rust-lang/rust repository. My best guess as to what's happening is that you're monomorphizing code from the standard library which uses |
How can we confirm/infirm this hypothesis? Installed components seem to be different:
|
Yes, those differences appear to be due to the presence of the rust-src component. You can either remove it, or add it to the 1.50.0 install. You may also consider experimenting with |
@ehuss But does that mean that rustc does not make (yet) any claims WRT reproducible builds? Context: https://reproducible-builds.org/ |
I don't want to speak for the compiler team (I am not on it), but AFAIK in general there is an effort to maintain reproducible builds on linux only, assuming you set up the environment correctly (such as with |
OK, reasonable enough. Yet I see I'm not the only one interested in reproducible builds on Windows: #71714, #66955. I would imagine this is also relevant for the Sealed Rust effort driven by Ferrous Systems as I imagine most/many corporate setups are around Windows systems, but I guess that's something @jamesmunns and @skade can give some inputs before the community. |
Problem
I am not 100% sure this is a bug or expected, but while exploring #75804, I have identified this inconsistency in the size of binaries of the same sources when using
+stable
vs+1.50-x86_64-pc-windows-msvc
:I would have expected that since the current stable is 1.50,
cargo +stable build
,cargo +1.50-... build
andcargo build
to yield the same results, but they don't.Unfortunately I can't share the actual tool sources, but I can share the deps list.
Steps
c:\tools\cygwin64\bin\bash.exe build-all.sh
Note how 1.50 versions have a different size than
+stable
and default on both release and debug builds.Is this expected?
Possible Solution(s)
Notes
Output of
cargo version
:OS and toolchain info above
The text was updated successfully, but these errors were encountered: