Skip to content
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

rustc: Always name bytecode based on crate ids #13321

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

When performing LTO, bytecode is loaded from an archive by using the crate id's
name. If the -o flag was specified when building the original library, it
previously also mangled the name of the bytecode.

This switches to always using the crate id's name when naming the bytecode file,
ensuring that it can always be loaded at a later date, regardless of -o.

Closes #13317

When performing LTO, bytecode is loaded from an archive by using the crate id's
name. If the -o flag was specified when building the original library, it
previously also mangled the name of the bytecode.

This switches to always using the crate id's name when naming the bytecode file,
ensuring that it can always be loaded at a later date, regardless of -o.

Closes rust-lang#13317
@lilyball
Copy link
Contributor

lilyball commented Apr 4, 2014

r+

@thestinger
Copy link
Contributor

travis failed due to a missing license issue

@alexcrichton
Copy link
Member Author

There's a more subtle bug going on, I'll try to get around to this later.

@alexcrichton alexcrichton deleted the issue-13317 branch April 5, 2014 22:05
@rprichard
Copy link
Contributor

Should this issue be reopened? The -o option still seems to be breaking LTO. (i.e. With a crate named foo, rustc foo.rs -o libfoo.rlib and rustc foo.rs output the same libfoo.rlib, but the archive has differently named entries (libfoo.0.bytecode.deflate vs foo.0.bytecode.deflate), and only the latter's entries work with LTO.)

@rprichard
Copy link
Contributor

I guess it wouldn't make sense to "reopen" this, because it's a pull request. Maybe file a report?

matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
…rednet

Make it clearer that the suggestion is an alternative one

`needless_pass_by_value` sometimes suggest marking the concerned type as `Copy`. Adding a `or` before this suggestion makes it clearer that this is not the second part of the original suggestion, but an alternative one.

Inspired by a misunderstanding in rust-lang#13321

changelog: none
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: internal compiler error: unexpected failure if -o filename is used
4 participants