Closed bmarcaur closed 3 years ago
I am gonna try and bisect exactly which version of rust this regressed as I do not think it is unique to 1.50.0.
Yeah seems to have regressed between 1.45.2 and 1.46.0.
Edit: I am kinda shocked that this behavior was left in the MSVC build chain as it really seems like it is a breaking change. The comments in this, https://github.com/rust-lang/rust/pull/72785, seem to indicate that they are aware of cases where it might break and that the fix is outlined in an RFC where you can control this explicitly, yet... the actual implementation of that has yet to be started.
Sorry for the notification spam, bors broke my PR 😞
Anyway, I published 0.2.2 which removes =static
as suggested in the forum thread you linked. I haven't really looked into why whole archive linking breaks things on MSVC targets, I just hope that this is an edge case and it didn't silently break a ton of crates.
and it didn't silently break a ton of crates
I hope that as well 👀
Thank you for the prompt fix!
windres-rs version:
0.2.1
rust version:1.50.0
Hello!
I have a simple build.rs file which contains:
where bitmap.rc is simply:
I am upgrading from 1.41.1 where this compiles without issue. After upgrading to 1.50.0 I am not getting something along the lines of:
Yet... that file does indeed exist in the location that is logged. If you look higher up in the logs you will see:
Doing some light searching I found this thread, https://users.rust-lang.org/t/linking-on-windows-without-wholearchive/49846, which seems to suggest removing
static
from the build.rs when linking lib's. However, this seems to be baked in to windres here, https://github.com/FaultyRAM/windres-rs/blob/master/src/msvc.rs#L99.I am not sure that I fully understand the issue and I was wondering if you have any thoughts.
Sorry for the terse logs, this is in support of company work and I don't feel comfortable dumping more complete logs, but if it will help I can try to do some more scrubbing.
I am hesitant to do a PR that "just removes this" because it lacks understanding on my part, but I can do that as well if you think that is the right course of action.
Thank you, and LMK how I can facilitate.