File tree Expand file tree Collapse file tree 4 files changed +30
-7
lines changed
Expand file tree Collapse file tree 4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,20 @@ matrix:
3232 os : linux
3333 - env : TARGET=thumbv6m-none-eabi
3434 os : linux
35+ - env : TARGET=thumbv6m-none-eabi WEAK=true
36+ os : linux
3537 - env : TARGET=thumbv7em-none-eabi
3638 os : linux
39+ - env : TARGET=thumbv7em-none-eabi WEAK=true
40+ os : linux
3741 - env : TARGET=thumbv7em-none-eabihf
3842 os : linux
43+ - env : TARGET=thumbv7em-none-eabihf WEAK=true
44+ os : linux
3945 - env : TARGET=thumbv7m-none-eabi
4046 os : linux
47+ - env : TARGET=thumbv7m-none-eabi WEAK=true
48+ os : linux
4149 - env : TARGET=x86_64-apple-darwin
4250 language : ruby
4351 os : osx
Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ rand = "0.3.14"
1818path = " gcc_s"
1919
2020[features ]
21- default = [" rlibc/weak" ]
21+ weak = [" rlibc/weak" ]
2222
2323[workspace ]
Original file line number Diff line number Diff line change @@ -8,8 +8,13 @@ gist_it() {
88}
99
1010build () {
11- $CARGO build --target $TARGET
12- $CARGO build --target $TARGET --release
11+ if [[ $WEAK ]]; then
12+ $CARGO build --features weak --target $TARGET
13+ $CARGO build --features weak --target $TARGET --release
14+ else
15+ $CARGO build --target $TARGET
16+ $CARGO build --target $TARGET --release
17+ fi
1318}
1419
1520inspect () {
@@ -19,12 +24,21 @@ inspect() {
1924 $PREFIX$OBJDUMP -Cd target/** /release/* .rlib | gist_it
2025 set -e
2126
22- # Check presence of weak symbols
23- if [[ $LINUX ]]; then
27+ # Check presence/absence of weak symbols
28+ if [[ $WEAK ]]; then
2429 local symbols=( memcmp memcpy memmove memset )
2530 for symbol in " ${symbols[@]} " ; do
26- $PREFIX$NM target/** /debug/deps/librlibc* .rlib | grep -q " W $symbol "
31+ $PREFIX$NM target/$TARGET /debug/deps/librlibc- * .rlib | grep -q " W $symbol "
2732 done
33+ else
34+ set +e
35+ ls target/$TARGET /debug/deps/librlibc-* .rlib
36+
37+ if [[ $? == 0 ]]; then
38+ exit 1
39+ fi
40+
41+ set -e
2842 fi
2943
3044}
@@ -50,6 +64,7 @@ main() {
5064 -e TRAVIS_BRANCH=$TRAVIS_BRANCH \
5165 -e TRAVIS_COMMIT=$TRAVIS_COMMIT \
5266 -e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
67+ -e WEAK=$WEAK \
5368 -v $( pwd) :/mnt \
5469 japaric/rustc-builtins \
5570 sh -c ' cd /mnt;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ extern crate gcc_s;
2323#[ cfg( test) ]
2424extern crate rand;
2525
26- #[ cfg( all ( not ( windows ) , not ( target_os = "macos" ) ) ) ]
26+ #[ cfg( feature = "weak" ) ]
2727extern crate rlibc;
2828
2929pub mod int;
You can’t perform that action at this time.
0 commit comments