File tree 3 files changed +22
-1
lines changed
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 3
3
name = " rustc_builtins"
4
4
version = " 0.1.0"
5
5
6
+ [dependencies ]
7
+ rlibc = { git = " https://github.com/alexcrichton/rlibc" , optional = true }
8
+
6
9
[dev-dependencies ]
7
10
quickcheck = " 0.3.1"
11
+
12
+ [features ]
13
+ default = [" rlibc/weak" ]
Original file line number Diff line number Diff line change @@ -9,10 +9,21 @@ build() {
9
9
10
10
inspect () {
11
11
$PREFIX$NM -g --defined-only target/** /debug/* .rlib
12
+
12
13
set +e
13
14
$PREFIX$OBJDUMP -Cd target/** /debug/* .rlib
14
15
$PREFIX$OBJDUMP -Cd target/** /release/* .rlib
15
16
set -e
17
+
18
+ # Check presence of weak symbols
19
+ case $TRAVIS_OS_NAME in
20
+ linux)
21
+ local symbols=( memcmp memcpy memmove memset )
22
+ for symbol in " ${symbols[@]} " ; do
23
+ $PREFIX$NM target/** /debug/deps/librlibc* .rlib | grep -q " W $symbol "
24
+ done
25
+ ;;
26
+ esac
16
27
}
17
28
18
29
run_tests () {
Original file line number Diff line number Diff line change 1
- #![ allow( unused_features) ]
2
1
#![ feature( asm) ]
3
2
#![ feature( core_intrinsics) ]
3
+ #![ feature( linkage) ]
4
4
#![ feature( naked_functions) ]
5
5
#![ cfg_attr( not( test) , no_std) ]
6
+ #![ no_builtins]
6
7
// TODO(rust-lang/rust#35021) uncomment when that PR lands
7
8
// #![feature(rustc_builtins)]
8
9
@@ -16,6 +17,9 @@ extern crate quickcheck;
16
17
#[ cfg( test) ]
17
18
extern crate core;
18
19
20
+ #[ cfg( all( not( windows) , not( target_os = "macos" ) ) ) ]
21
+ extern crate rlibc;
22
+
19
23
#[ cfg( target_arch = "arm" ) ]
20
24
pub mod arm;
21
25
You can’t perform that action at this time.
0 commit comments