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 {
172172 }
173173
174174 fn init ( & self , sess : & Session ) {
175- use rustc_session:: config:: Lto ;
175+ use rustc_session:: config:: { InstrumentCoverage , Lto } ;
176176 match sess. lto ( ) {
177177 Lto :: No | Lto :: ThinLocal => { }
178178 Lto :: Thin | Lto :: Fat => {
179179 sess. dcx ( ) . warn ( "LTO is not supported. You may get a linker error." )
180180 }
181181 }
182182
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+
183188 let mut config = self . config . borrow_mut ( ) ;
184189 if config. is_none ( ) {
185190 let new_config = BackendConfig :: from_opts ( & sess. opts . cg . llvm_args )
You can’t perform that action at this time.
0 commit comments