Merge pull request #164 from Faless/feat/mbedtls

[TLS] Move from OpenSSL to mbedTLS
This commit is contained in:
Fabio Alessandrelli
2025-05-21 20:59:16 +02:00
committed by GitHub
12 changed files with 162 additions and 370 deletions

View File

@@ -183,18 +183,21 @@ else:
sources.append("src/init_gdextension.cpp")
# Add our build tools
for tool in ["openssl", "cmake", "rtc"]:
for tool in ["cmake", "mbedtls", "rtc"]:
env.Tool(tool, toolpath=["tools"])
ssl = env.OpenSSL()
# Make sure Substfile is also loaded
env.Tool("textfile")
rtc = env.BuildLibDataChannel(ssl)
mbedtls = env.BuildMbedTLS()
rtc = env.BuildLibDataChannel(mbedtls)
# Forces building our sources after OpenSSL and libdatachannel.
# This is because OpenSSL headers are generated by their build system and SCons doesn't know about them.
# Note: This might not be necessary in this specific case since our sources doesn't include OpenSSL headers directly,
# but it's better to be safe in case of indirect inclusions by one of our other dependencies.
env.Depends(sources, ssl + rtc)
env.Depends(sources, rtc + mbedtls)
# We want to statically link against libstdc++ on Linux to maximize compatibility, but we must restrict the exported
# symbols using a GCC version script, or we might end up overriding symbols from other libraries.