mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Remove bin_nostd test, it will likely to finicky.
This commit is contained in:
parent
3e82792c4f
commit
aee4048229
@ -32,7 +32,6 @@ fn std_lib() {
|
|||||||
simple_lib_std();
|
simple_lib_std();
|
||||||
simple_bin_std();
|
simple_bin_std();
|
||||||
lib_nostd();
|
lib_nostd();
|
||||||
bin_nostd();
|
|
||||||
check_core();
|
check_core();
|
||||||
cross_custom();
|
cross_custom();
|
||||||
hashbrown();
|
hashbrown();
|
||||||
@ -79,59 +78,6 @@ fn lib_nostd() {
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bin_nostd() {
|
|
||||||
if cfg!(windows) {
|
|
||||||
// I think windows requires setting up mainCRTStartup,
|
|
||||||
// I'm not in the mood to figure it out.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let p = project()
|
|
||||||
.file("src/lib.rs", "#![no_std] pub fn foo() {}")
|
|
||||||
.file(
|
|
||||||
"src/main.rs",
|
|
||||||
r#"
|
|
||||||
#![no_std]
|
|
||||||
#![feature(lang_items, start, core_intrinsics)]
|
|
||||||
|
|
||||||
use core::panic::PanicInfo;
|
|
||||||
|
|
||||||
#[panic_handler]
|
|
||||||
fn panic(_info: &PanicInfo) -> ! {
|
|
||||||
unsafe { core::intrinsics::abort() }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[start]
|
|
||||||
fn start(_argc: isize, _argv: *const *const u8) -> isize {
|
|
||||||
foo::foo();
|
|
||||||
123
|
|
||||||
}
|
|
||||||
|
|
||||||
#[lang = "eh_personality"]
|
|
||||||
extern fn eh_personality() {}
|
|
||||||
"#,
|
|
||||||
)
|
|
||||||
.file(
|
|
||||||
"build.rs",
|
|
||||||
r#"
|
|
||||||
fn main() {
|
|
||||||
let target = std::env::var("TARGET").expect("TARGET was not set");
|
|
||||||
if target.contains("apple-darwin") {
|
|
||||||
println!("cargo:rustc-link-lib=System");
|
|
||||||
} else if target.contains("linux") {
|
|
||||||
// TODO: why is this needed?
|
|
||||||
println!("cargo:rustc-link-lib=c");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"#,
|
|
||||||
)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
cargo_build_std(&p, "run -v", "core")
|
|
||||||
.with_status(123)
|
|
||||||
.with_stderr_contains("[RUNNING] [..]foo[EXE]`")
|
|
||||||
.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
fn check_core() {
|
fn check_core() {
|
||||||
let p = project()
|
let p = project()
|
||||||
.file("src/lib.rs", "#![no_std] fn unused_fn() {}")
|
.file("src/lib.rs", "#![no_std] fn unused_fn() {}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user