Skip to content

Commit 5d53258

Browse files
arman-bdclaude
andcommitted
fix: add both ssl and crypto library directories for BoringSSL on macOS
The macOS linker needs to find both libssl.a (in build/ssl/) and libcrypto.a (in build/crypto/) when linking against BoringSSL. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2517b1f commit 5d53258

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,17 @@ def get_library_paths():
390390

391391
# Define C extension modules
392392
# Build library directories list
393-
BORINGSSL_LIB_DIRS = [LIB_PATHS["openssl_lib"]]
393+
# On macOS, BoringSSL builds libssl.a in build/ssl/ and libcrypto.a in build/crypto/
394+
if IS_MACOS:
395+
# Add both ssl and crypto directories for BoringSSL
396+
vendor_dir = Path("vendor").resolve()
397+
vendor_boringssl = vendor_dir / "boringssl"
398+
BORINGSSL_LIB_DIRS = [
399+
str(vendor_boringssl / "build" / "ssl"),
400+
str(vendor_boringssl / "build" / "crypto"),
401+
]
402+
else:
403+
BORINGSSL_LIB_DIRS = [LIB_PATHS["openssl_lib"]]
394404

395405
# Build include and library directory lists
396406
INCLUDE_DIRS = [

0 commit comments

Comments
 (0)