diff options
| author | bors <bors@rust-lang.org> | 2020-01-24 14:00:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-24 14:00:56 +0000 |
| commit | 73f76b74efcaf21bd5424d87c66cd6ed7fe5c7de (patch) | |
| tree | 984179012855837848c7d3b741234ec45b4ac2bf /src/librustc_codegen_ssa/back/write.rs | |
| parent | dee12bb2b7d75cce8fc8f21b5d7ea0da920df5e5 (diff) | |
| parent | 197cc1e43afba388a0266a08d2b946a187b766bb (diff) | |
Auto merge of #68414 - michaelwoerister:share-drop-glue, r=alexcrichton
Also share drop-glue when compiling with -Zshare-generics (i.e. at opt-level=0) This PR adds drop-glue to the set of monomorphizations that can be shared across crates via `-Zshare-generics`. This version of the PR might have detrimental effects on performance as it makes lots of stuff dependent on a single query results (`upstream_monomorphizations_for(def_id_of_drop_in_place)`). That should be fixable but let's do a perf run first. Potentially fixes issue https://github.com/rust-lang/rust/issues/64140. (cc @alexcrichton) The changes here are related to @matthewjasper's https://github.com/rust-lang/rust/pull/67332 but should be mostly orthogonal. r? @ghost
Diffstat (limited to 'src/librustc_codegen_ssa/back/write.rs')
| -rw-r--r-- | src/librustc_codegen_ssa/back/write.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs index 049faff7c49..841827d15fe 100644 --- a/src/librustc_codegen_ssa/back/write.rs +++ b/src/librustc_codegen_ssa/back/write.rs @@ -2,7 +2,8 @@ use super::command::Command; use super::link::{self, get_linker, remove}; use super::linker::LinkerInfo; use super::lto::{self, SerializedModule}; -use super::symbol_export::{symbol_name_for_instance_in_crate, ExportedSymbols}; +use super::symbol_export::symbol_name_for_instance_in_crate; + use crate::{ CachedModuleCodegen, CodegenResults, CompiledModule, CrateInfo, ModuleCodegen, ModuleKind, RLIB_BYTECODE_EXTENSION, @@ -12,6 +13,7 @@ use crate::traits::*; use jobserver::{Acquired, Client}; use rustc::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId}; use rustc::middle::cstore::EncodedMetadata; +use rustc::middle::exported_symbols::SymbolExportLevel; use rustc::session::config::{ self, Lto, OutputFilenames, OutputType, Passes, Sanitizer, SwitchWithOptPath, }; @@ -205,6 +207,8 @@ impl<B: WriteBackendMethods> Clone for TargetMachineFactory<B> { } } +pub type ExportedSymbols = FxHashMap<CrateNum, Arc<Vec<(String, SymbolExportLevel)>>>; + /// Additional resources used by optimize_and_codegen (not module specific) #[derive(Clone)] pub struct CodegenContext<B: WriteBackendMethods> { |
