diff --git a/appveyor.yml b/appveyor.yml index 07ac4a92a5ae17f28d08b356ec2000d65ac49997..fe2a332a1c425fdcc62506ea27c40c29cf7b0670 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,4 +24,5 @@ build: false test_script: - cargo test --target %TARGET% + - cargo test --no-default-features --target %TARGET% - cargo test --manifest-path libc-test/Cargo.toml --target %TARGET% diff --git a/ci/run.sh b/ci/run.sh index 02dd35a12bf8ecd1661b9310f27103d260fcf955..2a7b40069366c9009066234964f73c3b8c474ccb 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -79,4 +79,5 @@ if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then opt="--release" fi +exec cargo test $opt --no-default-features --target $TARGET exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 0d344edc5fbd2e5ae350e9d5c10d4c1781336b90..fc19241d5c7ba0906f8059c3eb8dd102cf5cb55a 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -277,8 +277,8 @@ cfg_if! { // cargo build, don't pull in anything extra as the libstd dep // already pulls in all libs. } else if #[cfg(target_env = "musl")] { - #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))] - #[link(name = "c", cfg(not(target_feature = "crt-static")))] + #[cfg_attr(feature = "stdbuild", link(name = "c", kind = "static", cfg(target_feature = "crt-static")))] + #[cfg_attr(feature = "stdbuild", link(name = "c", cfg(not(target_feature = "crt-static"))))] extern {} } else if #[cfg(target_os = "emscripten")] { #[link(name = "c")]