Disable some example which don't compile yet
This commit is contained in:
parent
7f2a887c83
commit
7f2a8f8a66
3 changed files with 10 additions and 7 deletions
2
build.sh
2
build.sh
|
@ -30,7 +30,7 @@ $RUSTC ../../examples/example.rs --crate-type lib &&
|
||||||
SHOULD_RUN=1 $RUSTC ../../examples/mini_core_hello_world.rs --crate-type bin &&
|
SHOULD_RUN=1 $RUSTC ../../examples/mini_core_hello_world.rs --crate-type bin &&
|
||||||
|
|
||||||
$RUSTC ../../examples/mini_core_hello_world.rs --crate-type bin &&
|
$RUSTC ../../examples/mini_core_hello_world.rs --crate-type bin &&
|
||||||
extract_data mini_core_hello_world mini_core_hello_world.o
|
extract_data mini_core_hello_world mini_core_hello_world.o &&
|
||||||
|
|
||||||
gcc mini_core.o mini_core_hello_world.o -o mini_core_hello_world &&
|
gcc mini_core.o mini_core_hello_world.o -o mini_core_hello_world &&
|
||||||
./mini_core_hello_world &&
|
./mini_core_hello_world &&
|
||||||
|
|
|
@ -33,12 +33,14 @@ enum BoolOption {
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
fn option_unwrap_or(o: BoolOption, d: bool) -> bool {
|
fn option_unwrap_or(o: BoolOption, d: bool) -> bool {
|
||||||
match o {
|
match o {
|
||||||
BoolOption::Some(b) => b,
|
BoolOption::Some(b) => b,
|
||||||
BoolOption::None => d,
|
BoolOption::None => d,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
fn ret_42() -> u8 {
|
fn ret_42() -> u8 {
|
||||||
42
|
42
|
||||||
|
@ -60,12 +62,12 @@ fn cmp_raw_ptr(a: *const u8, b: *const u8) -> bool {
|
||||||
a == b
|
a == b
|
||||||
}
|
}
|
||||||
|
|
||||||
fn int_cast(a: u16, b: i16) -> (u8, u16, u32, usize, i8, i16, i32, isize, u8, u32) {
|
/*fn int_cast(a: u16, b: i16) -> (u8, u16, u32, usize, i8, i16, i32, isize, u8, u32) {
|
||||||
(
|
(
|
||||||
a as u8, a as u16, a as u32, a as usize, a as i8, a as i16, a as i32, a as isize, b as u8,
|
a as u8, a as u16, a as u32, a as usize, a as i8, a as i16, a as i32, a as isize, b as u8,
|
||||||
b as u32,
|
b as u32,
|
||||||
)
|
)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
fn char_cast(c: char) -> u8 {
|
fn char_cast(c: char) -> u8 {
|
||||||
c as u8
|
c as u8
|
||||||
|
@ -151,9 +153,9 @@ fn repeat_array() -> [u8; 3] {
|
||||||
[0; 3]
|
[0; 3]
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn use_ctlz_nonzero(a: u16) -> u16 {
|
/*unsafe fn use_ctlz_nonzero(a: u16) -> u16 {
|
||||||
intrinsics::ctlz_nonzero(a)
|
intrinsics::ctlz_nonzero(a)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
fn ptr_as_usize(ptr: *const u8) -> usize {
|
fn ptr_as_usize(ptr: *const u8) -> usize {
|
||||||
ptr as usize
|
ptr as usize
|
||||||
|
@ -163,9 +165,9 @@ fn float_cast(a: f32, b: f64) -> (f64, f32) {
|
||||||
(a as f64, b as f32)
|
(a as f64, b as f32)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn int_to_float(a: u8, b: i32) -> (f64, f32) {
|
/*fn int_to_float(a: u8, b: i32) -> (f64, f32) {
|
||||||
(a as f64, b as f32)
|
(a as f64, b as f32)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
fn make_array() -> [u8; 3] {
|
fn make_array() -> [u8; 3] {
|
||||||
[42, 0, 5]
|
[42, 0, 5]
|
||||||
|
|
|
@ -99,6 +99,7 @@ mod prelude {
|
||||||
pub use crate::{CodegenCx, ModuleTup};
|
pub use crate::{CodegenCx, ModuleTup};
|
||||||
|
|
||||||
pub fn should_codegen(sess: &Session) -> bool {
|
pub fn should_codegen(sess: &Session) -> bool {
|
||||||
|
//return true;
|
||||||
::std::env::var("SHOULD_CODEGEN").is_ok()
|
::std::env::var("SHOULD_CODEGEN").is_ok()
|
||||||
|| sess.crate_types.get().contains(&CrateType::Executable)
|
|| sess.crate_types.get().contains(&CrateType::Executable)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue