diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-05-04 10:18:11 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-05-04 10:18:11 -0400 |
commit | 15cc57450b4de8ced936767c8160bc6a7dc3c76a (patch) | |
tree | c36bd4a4abefdca46f0b183377847e7152bf6214 /SConstruct | |
parent | 004183f093d99d6f54615eb3bb8caeb089ff47ac (diff) | |
download | mongo-15cc57450b4de8ced936767c8160bc6a7dc3c76a.tar.gz |
SERVER-34631 Ensure openssl binaries are in Windows zip
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/SConstruct b/SConstruct index e02281a1df0..70f32cbd94f 100644 --- a/SConstruct +++ b/SConstruct @@ -2802,29 +2802,12 @@ def doConfigure(myenv): sslLinkDependencies = ["crypto", "dl"] if conf.env.TargetOSIs('freebsd'): sslLinkDependencies = ["crypto"] + if conf.env.TargetOSIs('windows'): sslLibName = "ssleay32" cryptoLibName = "libeay32" sslLinkDependencies = ["libeay32"] - # Add the SSL binaries to the zip file distribution - def addOpenSslLibraryToDistArchive(file_name): - openssl_bin_path = os.path.normpath(env['WINDOWS_OPENSSL_BIN'].lower()) - full_file_name = os.path.join(openssl_bin_path, file_name) - if os.path.exists(full_file_name): - env.Append(ARCHIVE_ADDITIONS=[full_file_name]) - env.Append(ARCHIVE_ADDITION_DIR_MAP={ - openssl_bin_path: "bin" - }) - return True - else: - return False - - files = ['ssleay32.dll', 'libeay32.dll'] - for extra_file in files: - if not addOpenSslLibraryToDistArchive(extra_file): - print("WARNING: Cannot find SSL library '%s'" % extra_file) - # Used to import system certificate keychains if conf.env.TargetOSIs('darwin'): conf.env.AppendUnique(FRAMEWORKS=[ @@ -2992,6 +2975,29 @@ def doConfigure(myenv): else: ssl_provider = "none" + # The Windows build needs the openssl binaries if it targets openssl or includes the tools + # since the tools link against openssl + if conf.env.TargetOSIs('windows') and (ssl_provider == "openssl" or has_option("use-new-tools")): + # Add the SSL binaries to the zip file distribution + def addOpenSslLibraryToDistArchive(file_name): + openssl_bin_path = os.path.normpath(env['WINDOWS_OPENSSL_BIN'].lower()) + full_file_name = os.path.join(openssl_bin_path, file_name) + if os.path.exists(full_file_name): + env.Append(ARCHIVE_ADDITIONS=[full_file_name]) + env.Append(ARCHIVE_ADDITION_DIR_MAP={ + openssl_bin_path: "bin" + }) + return True + else: + return False + + files = ['ssleay32.dll', 'libeay32.dll'] + for extra_file in files: + if not addOpenSslLibraryToDistArchive(extra_file): + print("WARNING: Cannot find SSL library '%s'" % extra_file) + + + if free_monitoring == "auto": if "enterprise" not in env['MONGO_MODULES']: free_monitoring = "on" |