diff --git a/Cargo.toml b/Cargo.toml index 9aad90aeb4f175..ef847c1024a17d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,6 +91,3 @@ members = [ exclude = [ "programs/bpf", ] - -# This prevents a Travis CI error when building for Windows. -resolver = "2" diff --git a/ci/publish-tarball.sh b/ci/publish-tarball.sh index ef078f6636c0d5..3b8b7b10df80f8 100755 --- a/ci/publish-tarball.sh +++ b/ci/publish-tarball.sh @@ -58,6 +58,11 @@ windows) git config core.symlinks true find . -type l -delete git reset --hard + # The Windows build fails without resolver = "2", but including it in Cargo.toml causes + # other problems (see PR #26555 and Issue #22603). This adds resolver = "2" to + # Cargo.toml before building. Since the build environment does not persist the changes + # are discarded after the build and do not interfere with non-Windows builds. + echo 'resolver = "2"' >> Cargo.toml ) ;; *)