File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -204,8 +204,15 @@ impl CodegenBackend for GccCodegenBackend {
204
204
* * self . target_info . info . lock ( ) . expect ( "lock" ) = context. get_target_info ( ) ;
205
205
}
206
206
207
- // NOTE: try the LTO frontend and check if it errors out. If so, do not embed the bitcode.
207
+ // While not required by the API, we gate this code on the master feature to make sure we
208
+ // don't abort the process while checking if LTO is supported.
209
+ // The following could will emit a fatal error if LTO is not supported and older versions
210
+ // of libgccjit (the ones without this commit:
211
+ // https://github.com/rust-lang/gcc/commit/a073b06800f064b3917a6113d4cc2a0c19a10fda) will
212
+ // abort on fatal errors.
213
+ #[ cfg( feature = "master" ) ]
208
214
{
215
+ // NOTE: try the LTO frontend and check if it errors out. If so, do not embed the bitcode.
209
216
let temp_dir = TempDir :: new ( ) . expect ( "cannot create temporary directory" ) ;
210
217
let temp_file = temp_dir. keep ( ) . join ( "result.asm" ) ;
211
218
let context = Context :: default ( ) ;
You can’t perform that action at this time.
0 commit comments