diff --git a/.appveyor.yml b/.appveyor.yml index 760e3018c0..ee089ca75e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,9 +1,4 @@ environment: - # We don't want to do identical comdat folding as it messes up the ability to - # generate lossless backtraces in some cases. This is enabled by rustc by - # default so pass a flag to disable it to ensure our tests work ok. - RUSTFLAGS: -Clink-args=/OPT:NOICF - matrix: - TARGET: x86_64-pc-windows-gnu MSYSTEM: MINGW64 @@ -12,11 +7,6 @@ environment: MSYSTEM: MINGW32 CPU: i686 -matrix: - allow_failures: - - TARGET: x86_64-pc-windows-gnu - - TARGET: i686-pc-windows-gnu - install: - git submodule update --init --recursive - set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH% @@ -28,7 +18,3 @@ install: - cargo -vV build: false test_script: sh ci\run.sh - -branches: - only: - - master diff --git a/ci/run.sh b/ci/run.sh index 06ae69cfc6..ab27038165 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -28,7 +28,10 @@ fi # Use cargo on native CI platforms: case "${TARGET}" in "x86_64-unknown-linux-gnu") export CARGO_CMD=cargo ;; - *"windows"*) export CARGO_CMD=cargo ;; + *"windows"*) + export CARGO_CMD=cargo + export NOBGT=1 + ;; *"apple"*) export CARGO_CMD=cargo ;; esac @@ -53,10 +56,11 @@ then esac fi -if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "x86_64-apple-darwin" ] -then - ${CARGO_CMD} build -vv --target "${TARGET}" 2>&1 | tee build_no_std.txt +${CARGO_CMD} test -vv --target "${TARGET}" 2>&1 | tee build_no_std.txt +if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] \ + || [ "${TARGET}" = "x86_64-apple-darwin" ] +then # Check that the no-std builds are not linked against a libc with default # features or the `use_std` feature enabled: ! grep -q "default" build_no_std.txt @@ -71,17 +75,36 @@ then done fi -${CARGO_CMD} test -vv --target "${TARGET}" -${CARGO_CMD} test -vv --target "${TARGET}" --features profiling -${CARGO_CMD} test -vv --target "${TARGET}" --features debug -${CARGO_CMD} test -vv --target "${TARGET}" --features stats -${CARGO_CMD} test -vv --target "${TARGET}" --features 'debug profiling' ${CARGO_CMD} test -vv --target "${TARGET}" \ - --features unprefixed_malloc_on_supported_platforms -${CARGO_CMD} test -vv --target "${TARGET}" --no-default-features + --no-default-features \ + --features debug,stats,background_threads_runtime_support,\ + unprefixed_malloc_on_supported_platforms ${CARGO_CMD} test -vv --target "${TARGET}" --no-default-features \ --features background_threads_runtime_support +# jemalloc's tests fail on some targets when the profiling feature is enabled: +# https://github.com/jemalloc/jemalloc/issues/1320 +# https://github.com/alexcrichton/jemallocator/issues/85 +case "${TARGET}" in + *"windows"*) + unset JEMALLOC_SYS_RUN_JEMALLOC_TESTS + + ${CARGO_CMD} test -vv \ + --target "${TARGET}" --features profiling + + if [ "${NO_JEMALLOC_TESTS}" = "1" ] + then + : + else + export JEMALLOC_SYS_RUN_JEMALLOC_TESTS=1 + fi + + ;; + *) + ${CARGO_CMD} test -vv --target "${TARGET}" --features profiling + ;; +esac + if [ "${NOBGT}" = "1" ] then echo "enabling background threads by default at run-time is not tested" diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 4b6041fea0..609bf6a8b7 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -42,7 +42,7 @@ const NO_BG_THREAD_TARGETS: &[&str] = &["musl"]; // https://github.com/rust-lang/rust/commit/536011d929ecbd1170baf34e09580e567c971f95 // https://github.com/rust-lang/rust/commit/9f3de647326fbe50e0e283b9018ab7c41abccde3 // https://github.com/rust-lang/rust/commit/ed015456a114ae907a36af80c06f81ea93182a24 -const NO_UNPREFIXED_MALLOC: &[&str] = &["android", "dragonfly", "musl", "darwin"]; +const NO_UNPREFIXED_MALLOC: &[&str] = &["android", "dragonfly", "musl", "darwin", "windows"]; macro_rules! info { ($($args:tt)*) => { println!($($args)*) } diff --git a/jemalloc-sys/jemalloc b/jemalloc-sys/jemalloc index 61efbda709..d66f976628 160000 --- a/jemalloc-sys/jemalloc +++ b/jemalloc-sys/jemalloc @@ -1 +1 @@ -Subproject commit 61efbda7098de6fe64c362d309824864308c36d4 +Subproject commit d66f97662879a1a0c61ee12ba4b760fa6f458eef