Skip to content

Commit f936be4

Browse files
author
Clar Charr
committed
Attempt to fix musl build.
1 parent 0c1608a commit f936be4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
install:
88
- if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
99
script:
10-
- cargo build
11-
- cargo build --no-default-features
10+
- cargo build --target=$TARGET
11+
- cargo build --no-default-features --target=$TARGET
1212
- cargo generate-lockfile --manifest-path libc-test/Cargo.toml
1313
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
1414
sh ci/run-docker.sh $TARGET;

src/unix/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ cfg_if! {
229229
// cargo build, don't pull in anything extra as the libstd dep
230230
// already pulls in all libs.
231231
} else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
232-
#[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
233-
#[link(name = "c", cfg(not(target_feature = "crt-static")))]
232+
#[cfg_attr(stdbuild, link(name = "c", kind = "static", cfg(target_feature = "crt-static")))]
233+
#[cfg_attr(stdbuild, link(name = "c", cfg(not(target_feature = "crt-static"))))]
234234
extern {}
235235
} else if #[cfg(target_os = "emscripten")] {
236236
#[link(name = "c")]

src/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ pub const STRUNCATE: ::c_int = 80;
160160

161161
// inline comment below appeases style checker
162162
#[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, link(name = "msvcrt", cfg(not(target_feature = "crt-static"))))]
164+
#[cfg_attr(stdbuild, link(name = "libcmt", cfg(target_feature = "crt-static")))]
165165
extern {}
166166

167167
extern {

0 commit comments

Comments
 (0)