File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,19 @@ impl CodegenBackend for CraneliftCodegenBackend {
172
172
}
173
173
174
174
fn init ( & self , sess : & Session ) {
175
- use rustc_session:: config:: Lto ;
175
+ use rustc_session:: config:: { InstrumentCoverage , Lto } ;
176
176
match sess. lto ( ) {
177
177
Lto :: No | Lto :: ThinLocal => { }
178
178
Lto :: Thin | Lto :: Fat => {
179
179
sess. dcx ( ) . warn ( "LTO is not supported. You may get a linker error." )
180
180
}
181
181
}
182
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
+
183
188
let mut config = self . config . borrow_mut ( ) ;
184
189
if config. is_none ( ) {
185
190
let new_config = BackendConfig :: from_opts ( & sess. opts . cg . llvm_args )
You can’t perform that action at this time.
0 commit comments