Test with the 'c' feature enabled on CI
This commit is contained in:
parent
d63757cca8
commit
a1377878c6
|
@ -27,5 +27,9 @@ utest-cortex-m-qemu = { default-features = false, git = "https://github.com/japa
|
||||||
utest-macros = { git = "https://github.com/japaric/utest" }
|
utest-macros = { git = "https://github.com/japaric/utest" }
|
||||||
|
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "intrinsics"
|
||||||
|
required-features = ["c"]
|
||||||
|
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
|
@ -5,7 +5,7 @@ environment:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs
|
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
||||||
- rustup-init.exe --default-host x86_64-pc-windows-msvc --default-toolchain nightly -y
|
- rustup-init.exe --default-host x86_64-pc-windows-msvc --default-toolchain nightly -y
|
||||||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
||||||
- if "%TARGET%"=="i686-pc-windows-msvc" ( rustup target add %TARGET% )
|
- if "%TARGET%"=="i686-pc-windows-msvc" ( rustup target add %TARGET% )
|
||||||
|
@ -18,4 +18,6 @@ test_script:
|
||||||
- cargo build --target %TARGET%
|
- cargo build --target %TARGET%
|
||||||
- cargo build --release --target %TARGET%
|
- cargo build --release --target %TARGET%
|
||||||
- cargo test --no-default-features --features gen-tests --target %TARGET%
|
- cargo test --no-default-features --features gen-tests --target %TARGET%
|
||||||
|
- cargo test --no-default-features --features "gen-tests c" --target %TARGET%
|
||||||
- cargo test --no-default-features --features gen-tests --release --target %TARGET%
|
- cargo test --no-default-features --features gen-tests --release --target %TARGET%
|
||||||
|
- cargo test --no-default-features --features "gen-tests c" --release --target %TARGET%
|
||||||
|
|
|
@ -34,7 +34,9 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cargo test --no-default-features --features gen-tests --target $1
|
cargo test --no-default-features --features gen-tests --target $1
|
||||||
|
cargo test --no-default-features --features 'gen-tests c' --target $1
|
||||||
cargo test --no-default-features --features gen-tests --target $1 --release
|
cargo test --no-default-features --features gen-tests --target $1 --release
|
||||||
|
cargo test --no-default-features --features 'gen-tests c' --target $1 --release
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,17 @@
|
||||||
#![allow(unused_features)]
|
#![allow(unused_features)]
|
||||||
#![cfg_attr(thumb, no_main)]
|
#![cfg_attr(thumb, no_main)]
|
||||||
#![deny(dead_code)]
|
#![deny(dead_code)]
|
||||||
|
#![feature(alloc_system)]
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![feature(compiler_builtins_lib)]
|
#![feature(compiler_builtins_lib)]
|
||||||
#![feature(core_float)]
|
#![feature(core_float)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(libc)]
|
|
||||||
#![feature(start)]
|
#![feature(start)]
|
||||||
#![feature(i128_type)]
|
#![feature(i128_type)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
#[cfg(not(thumb))]
|
#[cfg(not(thumb))]
|
||||||
extern crate libc;
|
extern crate alloc_system;
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
|
||||||
// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
|
// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
|
||||||
|
@ -27,7 +27,6 @@ extern crate compiler_builtins;
|
||||||
// convention for its intrinsics that's different from other architectures; that's why some function
|
// convention for its intrinsics that's different from other architectures; that's why some function
|
||||||
// have an additional comment: the function name is the ARM name for the intrinsic and the comment
|
// have an additional comment: the function name is the ARM name for the intrinsic and the comment
|
||||||
// in the non-ARM name for the intrinsic.
|
// in the non-ARM name for the intrinsic.
|
||||||
#[cfg(feature = "c")]
|
|
||||||
mod intrinsics {
|
mod intrinsics {
|
||||||
use core::num::Float;
|
use core::num::Float;
|
||||||
|
|
||||||
|
@ -339,7 +338,6 @@ mod intrinsics {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "c")]
|
|
||||||
fn run() {
|
fn run() {
|
||||||
use intrinsics::*;
|
use intrinsics::*;
|
||||||
|
|
||||||
|
@ -404,33 +402,20 @@ fn run() {
|
||||||
bb(modti3(bb(2), bb(2)));
|
bb(modti3(bb(2), bb(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "c", not(thumb)))]
|
#[cfg(not(thumb))]
|
||||||
#[start]
|
#[start]
|
||||||
fn main(_: isize, _: *const *const u8) -> isize {
|
fn main(_: isize, _: *const *const u8) -> isize {
|
||||||
run();
|
run();
|
||||||
|
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(feature = "c"), not(thumb)))]
|
#[cfg(thumb)]
|
||||||
#[start]
|
|
||||||
fn main(_: isize, _: *const *const u8) -> isize {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(all(feature = "c", thumb))]
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn _start() -> ! {
|
pub fn _start() -> ! {
|
||||||
run();
|
run();
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(feature = "c"), thumb))]
|
|
||||||
#[no_mangle]
|
|
||||||
pub fn _start() -> ! {
|
|
||||||
loop {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ARM targets need these symbols
|
// ARM targets need these symbols
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn __aeabi_unwind_cpp_pr0() {}
|
pub fn __aeabi_unwind_cpp_pr0() {}
|
||||||
|
@ -447,9 +432,11 @@ pub fn _Unwind_Resume() {}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[lang = "eh_personality"]
|
#[lang = "eh_personality"]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
#[allow(private_no_mangle_fns)]
|
||||||
extern "C" fn eh_personality() {}
|
extern "C" fn eh_personality() {}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[lang = "panic_fmt"]
|
#[lang = "panic_fmt"]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
#[allow(private_no_mangle_fns)]
|
||||||
extern "C" fn panic_fmt() {}
|
extern "C" fn panic_fmt() {}
|
||||||
|
|
Loading…
Reference in New Issue