Skip to content

Commit 24e1a32

Browse files
arman-bdclaude
andcommitted
fix: handle Windows BoringSSL build directory layout
Windows CMake with Visual Studio generator builds BoringSSL libraries to: - build/ssl/Release/ssl.lib - build/crypto/Release/crypto.lib Updated Windows library path detection to check multiple possible layouts: 1. Visual Studio multi-config: build/ssl/Release/ and build/crypto/Release/ 2. Single-config with Release: build/Release/ 3. Single-config without subdirs: build/ This fixes linker errors on Windows CI where it couldn't find crypto.lib 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6ff42a0 commit 24e1a32

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

setup.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,33 @@ def get_library_paths():
262262
vendor_boringssl = vendor_dir / "boringssl"
263263

264264
# BoringSSL paths (always use vendor build)
265-
# Windows builds output to build/Release/ directory
265+
# Windows CMake with Visual Studio generator builds to build/ssl/Release/ and build/crypto/Release/
266266
boringssl_include = str(vendor_boringssl / "include")
267-
boringssl_lib = str(vendor_boringssl / "build" / "Release")
268267

269-
# Check if BoringSSL was built successfully
270-
if not (vendor_boringssl / "build" / "Release" / "ssl.lib").exists():
271-
print(f"WARNING: BoringSSL not found at {vendor_boringssl}")
272-
print("Please run: make setup")
268+
# Check for different possible build locations
269+
if (vendor_boringssl / "build" / "ssl" / "Release" / "ssl.lib").exists():
270+
# Visual Studio multi-config generator: build/ssl/Release/
271+
boringssl_lib = [
272+
str(vendor_boringssl / "build" / "ssl" / "Release"),
273+
str(vendor_boringssl / "build" / "crypto" / "Release"),
274+
]
275+
print(f"Using BoringSSL from: {vendor_boringssl / 'build'} (Visual Studio layout)")
276+
elif (vendor_boringssl / "build" / "Release" / "ssl.lib").exists():
277+
# Single-config generator with Release: build/Release/
278+
boringssl_lib = str(vendor_boringssl / "build" / "Release")
279+
print(f"Using BoringSSL from: {boringssl_lib}")
280+
elif (vendor_boringssl / "build" / "ssl.lib").exists():
281+
# Single-config generator: build/
282+
boringssl_lib = str(vendor_boringssl / "build")
283+
print(f"Using BoringSSL from: {boringssl_lib}")
284+
else:
285+
# Fallback - assume Visual Studio layout
286+
boringssl_lib = [
287+
str(vendor_boringssl / "build" / "ssl" / "Release"),
288+
str(vendor_boringssl / "build" / "crypto" / "Release"),
289+
]
290+
print(f"WARNING: BoringSSL not found, using default: {vendor_boringssl / 'build'}")
291+
print("Please run: bash scripts/setup_vendors.sh")
273292

274293
# nghttp2 paths - prefer vendor build, then vcpkg, then MSYS2
275294
vendor_nghttp2 = vendor_dir / "nghttp2"

0 commit comments

Comments
 (0)