From 17ce961fbf59c9a1aa14b0d9770753a9575dbe40 Mon Sep 17 00:00:00 2001 From: t1amak Date: Fri, 14 Nov 2025 08:33:21 +0000 Subject: [PATCH] win build fix 2 --- scripts/release/windows_x64/p2pool_windows_x64.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/release/windows_x64/p2pool_windows_x64.sh b/scripts/release/windows_x64/p2pool_windows_x64.sh index 2bd0ff1..0187c70 100755 --- a/scripts/release/windows_x64/p2pool_windows_x64.sh +++ b/scripts/release/windows_x64/p2pool_windows_x64.sh @@ -2,6 +2,13 @@ set -e cd /p2pool + +PATCH_TMP_ROOT="$(mktemp -d)" +trap 'rm -rf "$PATCH_TMP_ROOT"' EXIT +# Copy patches before checkout so they survive switching to older tags. +cp -r patches "$PATCH_TMP_ROOT/" +PATCH_DIR="$PATCH_TMP_ROOT/patches" + git fetch --jobs=$(nproc) git checkout $2 git submodule update --recursive --jobs $(nproc) @@ -24,8 +31,8 @@ flags_libs="--target=x86_64-pc-windows-gnu $flags_sysroot -Os -flto -Wl,/timesta flags_p2pool="--target=x86_64-pc-windows-gnu $flags_sysroot -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument -Wno-unknown-attributes $flags_size $flags_datetime" cd /p2pool -git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel patches/boringssl/win7.patch -git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel patches/boringssl/mingw-clang-intrin.patch +git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel "$PATCH_DIR/boringssl/win7.patch" +git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel "$PATCH_DIR/boringssl/mingw-clang-intrin.patch" cd /p2pool/external/src/curl cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/include