From 988843834fde65503735a9cecfb7619edd276b09 Mon Sep 17 00:00:00 2001 From: gnzlbg <gonzalobg88@gmail.com> Date: Tue, 27 Feb 2018 15:47:18 +0100 Subject: [PATCH] test --no-default-features and fix musl builds --- appveyor.yml | 1 + ci/run.sh | 1 + src/unix/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 07ac4a92..fe2a332a 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 02dd35a1..2a7b4006 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 0d344edc..fc19241d 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")] -- GitLab