We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f1d41e commit eb449c1Copy full SHA for eb449c1
src/lib.rs
@@ -172,14 +172,19 @@ impl CodegenBackend for CraneliftCodegenBackend {
172
}
173
174
fn init(&self, sess: &Session) {
175
- use rustc_session::config::Lto;
+ use rustc_session::config::{InstrumentCoverage, Lto};
176
match sess.lto() {
177
Lto::No | Lto::ThinLocal => {}
178
Lto::Thin | Lto::Fat => {
179
sess.dcx().warn("LTO is not supported. You may get a linker error.")
180
181
182
183
+ if sess.opts.cg.instrument_coverage() != InstrumentCoverage::No {
184
+ sess.dcx()
185
+ .fatal("`-Cinstrument-coverage` is LLVM specific and not supported by Cranelift");
186
+ }
187
+
188
let mut config = self.config.borrow_mut();
189
if config.is_none() {
190
let new_config = BackendConfig::from_opts(&sess.opts.cg.llvm_args)
0 commit comments