Skip to content

Commit 8613f3d

Browse files
committed
chore: more win fix
1 parent 97c83e4 commit 8613f3d

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

scripts/setup_vendors.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ fi
5252
cd boringssl
5353

5454
# Check if already built
55-
if [ ! -f "build/ssl/libssl.a" ]; then
55+
BUILD_MARKER="build/ssl/libssl.a"
56+
if [ "$OS" = "Windows" ]; then
57+
BUILD_MARKER="build/ssl/Release/ssl.lib"
58+
fi
59+
60+
if [ ! -f "$BUILD_MARKER" ]; then
5661
echo "Building BoringSSL..."
5762

5863
# BoringSSL requires CMake and Go
@@ -68,11 +73,21 @@ if [ ! -f "build/ssl/libssl.a" ]; then
6873
mkdir -p build
6974
cd build
7075

71-
cmake -DCMAKE_BUILD_TYPE=Release \
72-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
73-
..
74-
75-
make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)
76+
# Configure based on OS
77+
if [ "$OS" = "Windows" ]; then
78+
# Windows with MSVC - use Ninja generator for faster builds
79+
cmake -G "Ninja" \
80+
-DCMAKE_BUILD_TYPE=Release \
81+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
82+
..
83+
ninja
84+
else
85+
# Linux/macOS - use Unix Makefiles
86+
cmake -DCMAKE_BUILD_TYPE=Release \
87+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
88+
..
89+
make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)
90+
fi
7691

7792
echo "✓ BoringSSL built successfully"
7893

0 commit comments

Comments
 (0)