CI: use a recent nightly

- add #[no_mangle] to the panic_fmt lang item to adjust to changes in
the visibility algorithm

- adjust to changes in the layout of Cargo's target directory

- use a newer Xargo to reduce the build time of the sysroot (only core
is compiled as part of the sysroot now)
This commit is contained in:
Jorge Aparicio 2016-12-30 23:18:17 -05:00
parent 2d64b2df58
commit 3992ed1e7a
7 changed files with 20 additions and 16 deletions

View File

@ -1,8 +1,7 @@
cache: cargo
dist: trusty
language: rust
# NOTE(nightly-2016-12-05) work around for rust-lang/rust#38281
rust: nightly-2016-12-05
rust: nightly
services: docker
sudo: required

View File

@ -3,7 +3,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv6m_none_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv6m_none_eabi=arm-none-eabi-gcc \

View File

@ -3,7 +3,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7em_none_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7EM_NONE_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv7em_none_eabi=arm-none-eabi-gcc \

View File

@ -3,7 +3,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7em_none_eabihf=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7EM_NONE_EABIHF_LINKER=arm-none-eabi-gcc \
CC_thumbv7em_none_eabihf=arm-none-eabi-gcc \

View File

@ -3,7 +3,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7m_none_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7M_NONE_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv7m_none_eabi=arm-none-eabi-gcc \

View File

@ -26,7 +26,7 @@ esac
# TODO(#79) fix the undefined references problem for debug-assertions+lto
case $1 in
thumb*)
RUSTFLAGS="-C debug-assertions=no -C link-arg=-nostartfiles" xargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto
RUSTFLAGS="-C debug-assertions=no" xargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto -C link-arg=-nostartfiles
xargo rustc --no-default-features --features c --target $1 --bin intrinsics --release -- -C lto
;;
*)
@ -61,18 +61,22 @@ case $TRAVIS_OS_NAME in
;;
esac
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several times so ignore it
if [ $TRAVIS_OS_NAME = osx ]; then
path=target/${1}/debug/libcompiler_builtins.rlib
path=target/${1}/debug/deps/libcompiler_builtins-*.rlib
else
path=/target/${1}/debug/libcompiler_builtins.rlib
path=/target/${1}/debug/deps/libcompiler_builtins-*.rlib
fi
stdout=$($PREFIX$NM -g --defined-only $path)
for rlib in $(echo $path); do
stdout=$($PREFIX$NM -g --defined-only $rlib)
set +e
echo "$stdout" | sort | uniq -d | grep -v __x86.get_pc_thunk | grep 'T __'
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several times so ignore it
set +e
echo "$stdout" | sort | uniq -d | grep -v __x86.get_pc_thunk | grep 'T __'
if test $? = 0; then
exit 1
fi
if test $? = 0; then
exit 1
fi
done
true

View File

@ -403,5 +403,6 @@ pub fn _Unwind_Resume() {}
extern "C" fn eh_personality() {}
#[cfg(not(test))]
#[no_mangle]
#[lang = "panic_fmt"]
extern "C" fn panic_fmt() {}