diff options
| author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2022-08-26 20:50:37 -0700 |
|---|---|---|
| committer | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2022-09-24 10:24:48 -0700 |
| commit | 33b58ebf22bed790dacf2ef82351a95883559b77 (patch) | |
| tree | 1062d8b668fe6248b20f8f5b8e18ef1a0ba053b5 /src/lib.rs | |
| parent | 7fc07caf6798dcb29f91a6a57fd63e3d3ffa34ee (diff) | |
Add LTONotSupported
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index fc10112e55e..03f41d197b8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,6 +61,7 @@ mod type_of; use std::any::Any; use std::sync::{Arc, Mutex}; +use crate::errors::LTONotSupported; use gccjit::{Context, OptimizationLevel, CType}; use rustc_ast::expand::allocator::AllocatorKind; use rustc_codegen_ssa::{CodegenResults, CompiledModule, ModuleCodegen}; @@ -99,7 +100,7 @@ pub struct GccCodegenBackend { impl CodegenBackend for GccCodegenBackend { fn init(&self, sess: &Session) { if sess.lto() != Lto::No { - sess.warn("LTO is not supported. You may get a linker error."); + sess.emit_warning(LTONotSupported {}); } let temp_dir = TempDir::new().expect("cannot create temporary directory"); |
