Uh oh!
There was an error while loading. Please reload this page.
Let backends define custom targets - #76832
Conversation
Add a target_override hook that takes priority over builtin targets.
rust-highfive
commented
Sep 17, 2020
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eddyb
commented
Sep 17, 2020
oli-obk
left a comment
There was a problem hiding this comment.
Feels bit roundabout, but in such startup code this seems the best way forward.
Uh oh!
There was an error while loading. Please reload this page.
eddyb
commented
Sep 17, 2020
@bors r+ |
bors
commented
Sep 17, 2020
📌 Commit 48655c2 has been approved by |
| fn print_passes(&self) {} | ||
| fn print_version(&self) {} | ||
| /// If this plugin provides additional builtin targets, provide the one enabled by the options here. |
There was a problem hiding this comment.
| /// If this plugin provides additional builtin targets, provide the one enabled by the options here. | |
| /// If this codegen backend provides additional builtin targets, provide the one enabled by the options here. |
The llvm codegen backend is not in any way a plugin. It is linked into librustc_driver.so.
| 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. |
There was a problem hiding this comment.
Does the llvm codegen backend already check that init is called before anything else? If not it would be nice to check just in case. I think there is already a function for this used in some cases.
There was a problem hiding this comment.
Maybe open a separate issue? This PR doesn't add a target_override for the LLVM backend.
…=eddyb Let backends define custom targets Add a target_override hook that takes priority over builtin targets.
…=eddyb Let backends define custom targets Add a target_override hook that takes priority over builtin targets.
…=eddyb Let backends define custom targets Add a target_override hook that takes priority over builtin targets.
…=eddyb Let backends define custom targets Add a target_override hook that takes priority over builtin targets.
Rollup of 15 pull requests Successful merges: - rust-lang#76732 (Add docs for `BasicBlock`) - rust-lang#76832 (Let backends define custom targets) - rust-lang#76866 (Remove unused feature gates from library/ crates) - rust-lang#76875 (Move to intra-doc links in library/alloc/src/collections/binary_heap.rs) - rust-lang#76876 (Move to intra-doc links in collections/btree/map.rs and collections/linked_list.rs) - rust-lang#76877 (Move to intra-doc links in collections/vec_deque.rs and collections/vec_deque/drain.rs) - rust-lang#76878 (Move the version number to a plaintext file) - rust-lang#76883 (README.md: Remove prompts from code blocks) - rust-lang#76887 (Add missing examples on HashSet iter types) - rust-lang#76890 (use matches!() macro for simple if let conditions) - rust-lang#76891 (don't take `TyCtxt` by reference) - rust-lang#76910 (transmute: use diagnostic item) - rust-lang#76924 (Add tracking issue for feature(unix_socket_peek)) - rust-lang#76926 (BTreeMap: code readability tweaks) - rust-lang#76940 (Don't allow implementing trait directly on type-alias-impl-trait) Failed merges: r? `@ghost`
Add a target_override hook that takes priority over builtin targets.