| 191 | impl Metadata<'_> { |
| 192 | #[cfg(any(feature = "cranelift", feature = "winch"))] |
| 193 | pub fn new(engine: &Engine) -> Result<Metadata<'static>> { |
| 194 | let compiler = engine.try_compiler()?; |
| 195 | Ok(Metadata { |
| 196 | target: compiler.triple().to_string().into(), |
| 197 | shared_flags: compiler.flags().into(), |
| 198 | isa_flags: compiler.isa_flags().into(), |
| 199 | tunables: engine.tunables().clone(), |
| 200 | features: engine.features().bits(), |
| 201 | }) |
| 202 | } |
| 203 | |
| 204 | fn check_compatible(mut self, engine: &Engine) -> Result<()> { |
| 205 | self.check_triple(engine)?; |