Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: Handle duplicate names merging archives
When linking an archive statically to an rlib, the compiler will extract all contents of the archive and add them all to the rlib being generated. The current method of extraction is to run `ar x`, dumping all files into a temporary directory. Object archives, however, are allowed to have multiple entries with the same file name, so there is no method for them to extract their contents into a directory in a lossless fashion. This commit adds iterator support to the `ArchiveRO` structure which hooks into LLVM's support for reading object archives. This iterator is then used to inspect each object in turn and extract it to a unique location for later assembly.
- Loading branch information
1 parent
77acda1
commit 9ab0475
Showing
12 changed files
with
264 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.