about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2025-03-07 15:44:15 +0100
committerSam McCall <sam.mccall@gmail.com>2025-03-07 18:33:05 +0100
commit607987e3e24560312eb258d0217e5e00b31bec71 (patch)
tree9dcbf787f020dd54b7c696ea7e75e3025f43e524 /compiler/rustc_metadata/src
parent91a0e1604f343730022bc903cbf201d8b0a86a71 (diff)
Support rmeta inputs for --crate-type=bin --emit=obj
This already works for --emit=metadata, but is possible anytime we're not
linking.

Tests:
`rmeta_bin` checks we're not changing --emit=link (already passes)
`rmeta_bin-pass` tests the new behavior for --emit=obj (would fail today)
                 and also --emit=metadata which isn't changing
Diffstat (limited to 'compiler/rustc_metadata/src')
-rw-r--r--compiler/rustc_metadata/src/dependency_format.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/dependency_format.rs b/compiler/rustc_metadata/src/dependency_format.rs
index 582c2215d92..be31aa629c8 100644
--- a/compiler/rustc_metadata/src/dependency_format.rs
+++ b/compiler/rustc_metadata/src/dependency_format.rs
@@ -84,7 +84,7 @@ pub(crate) fn calculate(tcx: TyCtxt<'_>) -> Dependencies {
 fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
     let sess = &tcx.sess;
 
-    if !sess.opts.output_types.should_codegen() {
+    if !sess.opts.output_types.should_link() {
         return IndexVec::new();
     }