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

Invalid or corrupt file when "releasing" on MSVC #15

Open
jerryc05 opened this issue May 9, 2020 · 3 comments
Open

Invalid or corrupt file when "releasing" on MSVC #15

jerryc05 opened this issue May 9, 2020 · 3 comments

Comments

@jerryc05
Copy link

jerryc05 commented May 9, 2020

For a tiny program like this:

fn main() {
  println!("{:?}", instant::Duration::from_secs(1));
}

when running in debug mode, nothing bad happens, but when I run in release mode, I got this error:

  = note: LINK : warning LNK4044: unrecognized option '/s'; ignored
          [hidden]\tiny-ffmpeg-gui\target\release\deps\instant-bce189fdb2307e6a.instant.dt1bllbr-cgu.0.rcgu.o : fatal error LNK1107: invalid or corrupt file: cannot read at 0x55C


error: aborting due to previous error

error: could not compile `instant`.
@jdelgadoalfonso
Copy link

Which rustc version are you using? is LTO enabled?

I think it is an issue introduced as of nightly-2020-05-08 and related to LTO. However, it just appears in some crates like this one.

@jerryc05
Copy link
Author

jerryc05 commented May 9, 2020

Which rustc version are you using? is LTO enabled?

I think it is an issue introduced as of nightly-2020-05-08 and related to LTO. However, it just appears in some crates like this one.

latest nightly rustc, just updated yesterday, and lto is enabled.

@cwfitzgerald
Copy link

Can confirm, rolling back to 2020-05-07 fixes the problem.

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

3 participants