* Introduce a `TargetFrontendConfig` type. `TargetFrontendConfig` is information specific to the target which is provided to frontends to allow them to produce Cranelift IR for the target. Currently this includes the pointer size and the default calling convention. The default calling convention is now inferred from the target, rather than being a setting. cranelift-native is now just a provider of target information, rather than also being a provider of settings, which gives it a clearer role. And instead of having cranelift-frontend routines require the whole `TargetIsa`, just require the `TargetFrontendConfig`, and add a way to get the `TargetFrontendConfig` from a `Module`. Fixes #529. Fixes #555.
53 lines
1.5 KiB
Rust
53 lines
1.5 KiB
Rust
//! Cranelift umbrella crate, providing a convenient one-line dependency.
|
|
|
|
#![deny(
|
|
missing_docs,
|
|
trivial_numeric_casts,
|
|
unused_extern_crates,
|
|
unstable_features
|
|
)]
|
|
#![warn(unused_import_braces)]
|
|
#![cfg_attr(
|
|
feature = "clippy",
|
|
plugin(clippy(conf_file = "../../clippy.toml"))
|
|
)]
|
|
#![cfg_attr(
|
|
feature = "cargo-clippy",
|
|
allow(new_without_default, new_without_default_derive)
|
|
)]
|
|
#![cfg_attr(
|
|
feature = "cargo-clippy",
|
|
warn(
|
|
float_arithmetic,
|
|
mut_mut,
|
|
nonminimal_bool,
|
|
option_map_unwrap_or,
|
|
option_map_unwrap_or_else,
|
|
print_stdout,
|
|
unicode_not_nfc,
|
|
use_self
|
|
)
|
|
)]
|
|
|
|
/// Provide these crates, renamed to reduce stutter.
|
|
pub extern crate cranelift_codegen as codegen;
|
|
pub extern crate cranelift_frontend as frontend;
|
|
|
|
/// A prelude providing convenient access to commonly-used cranelift features. Use
|
|
/// as `use cranelift::prelude::*`.
|
|
pub mod prelude {
|
|
pub use codegen;
|
|
pub use codegen::entity::EntityRef;
|
|
pub use codegen::ir::condcodes::{FloatCC, IntCC};
|
|
pub use codegen::ir::immediates::{Ieee32, Ieee64, Imm64};
|
|
pub use codegen::ir::types;
|
|
pub use codegen::ir::{
|
|
AbiParam, Ebb, ExtFuncData, ExternalName, GlobalValueData, InstBuilder, JumpTableData,
|
|
MemFlags, Signature, StackSlotData, StackSlotKind, TrapCode, Type, Value,
|
|
};
|
|
pub use codegen::isa;
|
|
pub use codegen::settings::{self, Configurable};
|
|
|
|
pub use frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
|
|
}
|