Try testing MinGW targets
This commit is contained in:
parent
635e519b86
commit
d513c92b01
21
appveyor.yml
21
appveyor.yml
|
@ -3,12 +3,29 @@ environment:
|
||||||
- TARGET: i686-pc-windows-msvc
|
- TARGET: i686-pc-windows-msvc
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
|
# Ensure MinGW works, but we need to download the 32-bit MinGW compiler from a
|
||||||
|
# custom location.
|
||||||
|
- TARGET: i686-pc-windows-gnu
|
||||||
|
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
|
||||||
|
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
||||||
|
MINGW_DIR: mingw32
|
||||||
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
|
MSYS_BITS: 64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
- 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
|
- if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET%
|
||||||
- if "%TARGET%"=="i686-pc-windows-msvc" ( rustup target add %TARGET% )
|
|
||||||
|
# Use the system msys if we can
|
||||||
|
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
|
# download a custom compiler otherwise
|
||||||
|
- if defined MINGW_URL appveyor DownloadFile %MINGW_URL%/%MINGW_ARCHIVE%
|
||||||
|
- if defined MINGW_URL 7z x -y %MINGW_ARCHIVE% > nul
|
||||||
|
- if defined MINGW_URL set PATH=C:\Python27;%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
- rustc -Vv
|
- rustc -Vv
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
#![feature(core_float)]
|
#![feature(core_float)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(start)]
|
#![feature(start)]
|
||||||
|
#![feature(panic_unwind)]
|
||||||
#![feature(i128_type)]
|
#![feature(i128_type)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
#[cfg(not(thumb))]
|
#[cfg(not(thumb))]
|
||||||
extern crate alloc_system;
|
extern crate alloc_system;
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
extern crate panic_unwind;
|
||||||
|
|
||||||
// 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
|
||||||
// compiler-rt provides a C/assembly implementation.
|
// compiler-rt provides a C/assembly implementation.
|
||||||
|
@ -400,6 +402,20 @@ fn run() {
|
||||||
bb(umodti3(bb(2), bb(2)));
|
bb(umodti3(bb(2), bb(2)));
|
||||||
bb(divti3(bb(2), bb(2)));
|
bb(divti3(bb(2), bb(2)));
|
||||||
bb(modti3(bb(2), bb(2)));
|
bb(modti3(bb(2), bb(2)));
|
||||||
|
|
||||||
|
something_with_a_dtor(&|| assert_eq!(bb(1), 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn something_with_a_dtor(f: &Fn()) {
|
||||||
|
struct A<'a>(&'a (Fn() + 'a));
|
||||||
|
|
||||||
|
impl<'a> Drop for A<'a> {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
(self.0)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let _a = A(f);
|
||||||
|
f();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(thumb))]
|
#[cfg(not(thumb))]
|
||||||
|
@ -428,18 +444,6 @@ pub fn __aeabi_unwind_cpp_pr0() {}
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn __aeabi_unwind_cpp_pr1() {}
|
pub fn __aeabi_unwind_cpp_pr1() {}
|
||||||
|
|
||||||
// Avoid "undefined reference to `_Unwind_Resume`" errors
|
|
||||||
#[allow(non_snake_case)]
|
|
||||||
#[no_mangle]
|
|
||||||
pub fn _Unwind_Resume() {}
|
|
||||||
|
|
||||||
// Lang items
|
|
||||||
#[cfg(not(test))]
|
|
||||||
#[lang = "eh_personality"]
|
|
||||||
#[no_mangle]
|
|
||||||
#[allow(private_no_mangle_fns)]
|
|
||||||
extern "C" fn eh_personality() {}
|
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[lang = "panic_fmt"]
|
#[lang = "panic_fmt"]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
Loading…
Reference in New Issue