Skip to content

Commit d38a5a6

Browse files
committed
Make --print=backend-has-zstd work by default on any backend
Using a defaulted `CodegenBackend` method that querying for zstd support should automatically print a safe value of `false` on any backend that doesn't specifically indicate the presence or absence of zstd.
1 parent 66381e3 commit d38a5a6

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/lib.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use rustc_codegen_ssa::{CodegenResults, TargetConfig};
4747
use rustc_log::tracing::info;
4848
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
4949
use rustc_session::Session;
50-
use rustc_session::config::{OutputFilenames, PrintKind, PrintRequest};
50+
use rustc_session::config::OutputFilenames;
5151
use rustc_span::{Symbol, sym};
5252
use rustc_target::spec::{Abi, Arch, Env, Os};
5353

@@ -160,16 +160,6 @@ impl CodegenBackend for CraneliftCodegenBackend {
160160
}
161161
}
162162

163-
fn print(&self, req: &PrintRequest, out: &mut String, _sess: &Session) {
164-
match req.kind {
165-
// FIXME have a default impl that returns false
166-
PrintKind::BackendHasZstd => {
167-
out.push_str("false\n");
168-
}
169-
_ => {}
170-
}
171-
}
172-
173163
fn target_config(&self, sess: &Session) -> TargetConfig {
174164
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
175165
let target_features = match sess.target.arch {

0 commit comments

Comments
 (0)