Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ def get_gas_version(cc):
warn(f'Could not recognize `gas`: {gas_ret}')
return '0.0'

def get_openssl_version():
def get_openssl_version(o):
"""Parse OpenSSL version from opensslv.h header file.

Returns the version as a number matching OPENSSL_VERSION_NUMBER format:
Expand All @@ -1219,6 +1219,9 @@ def get_openssl_version():
args = ['-I', 'deps/openssl/openssl/include'] + args
elif options.shared_openssl_includes:
args = ['-I', options.shared_openssl_includes] + args
else:
for dir in o['include_dirs']:
args = ['-I', dir] + args

proc = subprocess.Popen(
shlex.split(CC) + args,
Expand Down Expand Up @@ -1887,10 +1890,10 @@ def without_ssl_error(option):
if options.quic:
o['defines'] += ['NODE_OPENSSL_HAS_QUIC']

o['variables']['openssl_version'] = get_openssl_version()

configure_library('openssl', o)

o['variables']['openssl_version'] = get_openssl_version(o)

def configure_sqlite(o):
o['variables']['node_use_sqlite'] = b(not options.without_sqlite)
if options.without_sqlite:
Expand Down
Loading