Most of the way to no_std support
This commit is contained in:
committed by
Dan Gohman
parent
2a26b70854
commit
7375088c3e
@@ -13,3 +13,6 @@ name = "cton_frontend"
|
||||
|
||||
[dependencies]
|
||||
cretonne = { path = "../cretonne", version = "0.1.0" }
|
||||
|
||||
[features]
|
||||
no_std = ["cretonne/no_std"]
|
||||
|
||||
@@ -142,11 +142,23 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
#![cfg_attr(feature = "no_std", no_std)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#![cfg_attr(feature = "no_std", feature(alloc))]
|
||||
|
||||
extern crate cretonne;
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
extern crate alloc;
|
||||
|
||||
pub use frontend::{ILBuilder, FunctionBuilder};
|
||||
|
||||
mod frontend;
|
||||
mod ssa;
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
mod std {
|
||||
pub use alloc::vec;
|
||||
pub use core::*;
|
||||
}
|
||||
@@ -15,6 +15,7 @@ use std::u32;
|
||||
use cretonne::ir::types::{F32, F64};
|
||||
use cretonne::ir::immediates::{Ieee32, Ieee64};
|
||||
use std::mem;
|
||||
use std::vec::Vec;
|
||||
|
||||
/// Structure containing the data relevant the construction of SSA for a given function.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user