-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trans: Consolidate creating pass manager builders
The LTO pass in the compiler forgot to call the `LLVMRustAddBuilderLibraryInfo` function and configure other options such as merge_functions, vectorize_slp, etc. This ended up causing linker errors on MSVC targets because the optimizer didn't have the right knowledge that some system functions are missing on these platforms. This commit consolidates creation of PassManagerBuilder instances to one function which is then called when needed. This ensures that the pass manager is always correctly configured with the various target-specific information that LLVM needs. Overall, this fixes `-C lto -C opt-level=3` on 32-bit MSVC targets.
- Loading branch information
1 parent
5542830
commit 70e8220
Showing
2 changed files
with
70 additions
and
79 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