Add clif-util compile option to output object file (#5493)

* add clif-util compile option to output object file

* switch from a box to a borrow

* update objectmodule tests to use borrowed isa

* put targetisa into an arc
This commit is contained in:
Sam Sartor
2023-01-06 13:53:48 -07:00
committed by GitHub
parent 9156cca8ca
commit 1efa3d6f8b
15 changed files with 114 additions and 62 deletions

View File

@@ -2,7 +2,7 @@
pub use self::inst::{args, EmitInfo, EmitState, Inst};
use super::TargetIsa;
use super::{OwnedTargetIsa, TargetIsa};
use crate::ir::{condcodes::IntCC, Function, Type};
#[cfg(feature = "unwind")]
use crate::isa::unwind::systemv;
@@ -196,7 +196,7 @@ fn isa_constructor(
triple: Triple,
shared_flags: Flags,
builder: shared_settings::Builder,
) -> CodegenResult<Box<dyn TargetIsa>> {
) -> CodegenResult<OwnedTargetIsa> {
let isa_flags = x64_settings::Flags::new(&shared_flags, builder);
// Check for compatibility between flags and ISA level
@@ -214,7 +214,7 @@ fn isa_constructor(
}
let backend = X64Backend::new_with_flags(triple, shared_flags, isa_flags);
Ok(Box::new(backend))
Ok(backend.wrapped())
}
#[cfg(test)]