File tree 4 files changed +30
-7
lines changed
4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,20 @@ matrix:
32
32
os : linux
33
33
- env : TARGET=thumbv6m-none-eabi
34
34
os : linux
35
+ - env : TARGET=thumbv6m-none-eabi WEAK=true
36
+ os : linux
35
37
- env : TARGET=thumbv7em-none-eabi
36
38
os : linux
39
+ - env : TARGET=thumbv7em-none-eabi WEAK=true
40
+ os : linux
37
41
- env : TARGET=thumbv7em-none-eabihf
38
42
os : linux
43
+ - env : TARGET=thumbv7em-none-eabihf WEAK=true
44
+ os : linux
39
45
- env : TARGET=thumbv7m-none-eabi
40
46
os : linux
47
+ - env : TARGET=thumbv7m-none-eabi WEAK=true
48
+ os : linux
41
49
- env : TARGET=x86_64-apple-darwin
42
50
language : ruby
43
51
os : osx
Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ rand = "0.3.14"
18
18
path = " gcc_s"
19
19
20
20
[features ]
21
- default = [" rlibc/weak" ]
21
+ weak = [" rlibc/weak" ]
22
22
23
23
[workspace ]
Original file line number Diff line number Diff line change @@ -8,8 +8,13 @@ gist_it() {
8
8
}
9
9
10
10
build () {
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
13
18
}
14
19
15
20
inspect () {
@@ -19,12 +24,21 @@ inspect() {
19
24
$PREFIX$OBJDUMP -Cd target/** /release/* .rlib | gist_it
20
25
set -e
21
26
22
- # Check presence of weak symbols
23
- if [[ $LINUX ]]; then
27
+ # Check presence/absence of weak symbols
28
+ if [[ $WEAK ]]; then
24
29
local symbols=( memcmp memcpy memmove memset )
25
30
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 "
27
32
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
28
42
fi
29
43
30
44
}
@@ -50,6 +64,7 @@ main() {
50
64
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
51
65
-e TRAVIS_COMMIT=$TRAVIS_COMMIT \
52
66
-e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
67
+ -e WEAK=$WEAK \
53
68
-v $( pwd) :/mnt \
54
69
japaric/rustc-builtins \
55
70
sh -c ' cd /mnt;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ extern crate gcc_s;
23
23
#[ cfg( test) ]
24
24
extern crate rand;
25
25
26
- #[ cfg( all ( not ( windows ) , not ( target_os = "macos" ) ) ) ]
26
+ #[ cfg( feature = "weak" ) ]
27
27
extern crate rlibc;
28
28
29
29
pub mod int;
You can’t perform that action at this time.
0 commit comments