diff options
| author | bors <bors@rust-lang.org> | 2020-09-20 15:12:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-20 15:12:40 +0000 |
| commit | 81e02708f1f4760244756548981277d5199baa9a (patch) | |
| tree | f8f6f7d4f1a2566325892459032750daca6b2599 /compiler/rustc_codegen_ssa/src | |
| parent | b873fa6d42cf305131d2583d03b84686e5e40f2e (diff) | |
| parent | fc58224b79627351225ad52cb93a9cb8063c5a71 (diff) | |
| download | rust-81e02708f1f4760244756548981277d5199baa9a.tar.gz rust-81e02708f1f4760244756548981277d5199baa9a.zip | |
Auto merge of #76975 - RalfJung:rollup-s2wiuqr, r=RalfJung
Rollup of 15 pull requests Successful merges: - #76732 (Add docs for `BasicBlock`) - #76832 (Let backends define custom targets) - #76866 (Remove unused feature gates from library/ crates) - #76875 (Move to intra-doc links in library/alloc/src/collections/binary_heap.rs) - #76876 (Move to intra-doc links in collections/btree/map.rs and collections/linked_list.rs) - #76877 (Move to intra-doc links in collections/vec_deque.rs and collections/vec_deque/drain.rs) - #76878 (Move the version number to a plaintext file) - #76883 (README.md: Remove prompts from code blocks) - #76887 (Add missing examples on HashSet iter types) - #76890 (use matches!() macro for simple if let conditions) - #76891 (don't take `TyCtxt` by reference) - #76910 (transmute: use diagnostic item) - #76924 (Add tracking issue for feature(unix_socket_peek)) - #76926 (BTreeMap: code readability tweaks) - #76940 (Don't allow implementing trait directly on type-alias-impl-trait) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/backend.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs index 3522ea01153..90520f77e3c 100644 --- a/compiler/rustc_codegen_ssa/src/traits/backend.rs +++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs @@ -15,6 +15,7 @@ use rustc_session::{ }; use rustc_span::symbol::Symbol; use rustc_target::abi::LayoutOf; +use rustc_target::spec::Target; pub use rustc_data_structures::sync::MetadataRef; @@ -54,6 +55,12 @@ pub trait CodegenBackend { fn print_passes(&self) {} fn print_version(&self) {} + /// If this plugin provides additional builtin targets, provide the one enabled by the options here. + /// Be careful: this is called *before* init() is called. + fn target_override(&self, _opts: &config::Options) -> Option<Target> { + None + } + fn metadata_loader(&self) -> Box<MetadataLoaderDyn>; fn provide(&self, _providers: &mut Providers); fn provide_extern(&self, _providers: &mut Providers); |
