File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
target
2
2
Cargo.lock
3
3
* ~
4
+ /style
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ services:
7
7
install :
8
8
- if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
9
9
script :
10
- - cargo build
11
- - cargo build --no-default-features
10
+ - cargo build --target=$TARGET
11
+ - cargo build --no-default-features --target=$TARGET
12
12
- cargo generate-lockfile --manifest-path libc-test/Cargo.toml
13
13
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
14
14
sh ci/run-docker.sh $TARGET;
Original file line number Diff line number Diff line change @@ -242,13 +242,18 @@ cfg_if! {
242
242
// cargo build, don't pull in anything extra as the libstd dep
243
243
// already pulls in all libs.
244
244
} else if #[ cfg( any( all( target_env = "musl" , not( target_arch = "mips" ) ) ) ) ] {
245
- #[ link( name = "c" , kind = "static" , cfg( target_feature = "crt-static" ) ) ]
246
- #[ link( name = "c" , cfg( not( target_feature = "crt-static" ) ) ) ]
245
+ #[ cfg_attr( stdbuild,
246
+ link( name = "c" , kind = "static" ,
247
+ cfg( target_feature = "crt-static" ) ) ) ]
248
+ #[ cfg_attr( stdbuild,
249
+ link( name = "c" ,
250
+ cfg( not( target_feature = "crt-static" ) ) ) ) ]
247
251
extern { }
248
252
} else if #[ cfg( target_os = "emscripten" ) ] {
249
253
#[ link( name = "c" ) ]
250
254
extern { }
251
- } else if #[ cfg( all( target_os = "netbsd" , target_vendor = "rumprun" ) ) ] {
255
+ } else if #[ cfg( all( stdbuild,
256
+ target_os = "netbsd" , target_vendor = "rumprun" ) ) ] {
252
257
// Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
253
258
// in automatically by the linker. We avoid passing it explicitly, as it
254
259
// causes some versions of binutils to crash with an assertion failure.
Original file line number Diff line number Diff line change @@ -160,8 +160,10 @@ pub const STRUNCATE: ::c_int = 80;
160
160
161
161
// inline comment below appeases style checker
162
162
#[ cfg( all( target_env = "msvc" , feature = "stdbuild" ) ) ] // " if "
163
- #[ link( name = "msvcrt" , cfg( not( target_feature = "crt-static" ) ) ) ]
164
- #[ link( name = "libcmt" , cfg( target_feature = "crt-static" ) ) ]
163
+ #[ cfg_attr( stdbuild,
164
+ link( name = "msvcrt" , cfg( not( target_feature = "crt-static" ) ) ) ) ]
165
+ #[ cfg_attr( stdbuild,
166
+ link( name = "libcmt" , cfg( target_feature = "crt-static" ) ) ) ]
165
167
extern { }
166
168
167
169
extern {
You can’t perform that action at this time.
0 commit comments