mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
gyp: implement LD/LDXX for ninja and FIPS
The ability to set the link rule is used for FIPS, and needs to set both the `ld =` and `ldxx =` variables in the ninja build file to link c++ (node) and c (openssl-cli, etc.) executables. URL: https://github.com/nodejs/node/pull/14227 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
committed by
Myles Borins
parent
8b69504e17
commit
f8b60e40a4
3
configure
vendored
3
configure
vendored
@@ -968,8 +968,11 @@ def configure_openssl(o):
|
||||
o['variables']['openssl_fips'] = options.openssl_fips
|
||||
fips_dir = os.path.join(root_dir, 'deps', 'openssl', 'fips')
|
||||
fips_ld = os.path.abspath(os.path.join(fips_dir, 'fipsld'))
|
||||
# LINK is for Makefiles, LD/LDXX is for ninja
|
||||
o['make_fips_settings'] = [
|
||||
['LINK', fips_ld + ' <(openssl_fips)/bin/fipsld'],
|
||||
['LD', fips_ld + ' <(openssl_fips)/bin/fipsld'],
|
||||
['LDXX', fips_ld + ' <(openssl_fips)/bin/fipsld'],
|
||||
]
|
||||
else:
|
||||
o['variables']['openssl_fips'] = ''
|
||||
|
||||
@@ -1865,6 +1865,10 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
||||
ld = os.path.join(build_to_root, value)
|
||||
if key == 'LD.host':
|
||||
ld_host = os.path.join(build_to_root, value)
|
||||
if key == 'LDXX':
|
||||
ldxx = os.path.join(build_to_root, value)
|
||||
if key == 'LDXX.host':
|
||||
ldxx_host = os.path.join(build_to_root, value)
|
||||
if key == 'NM':
|
||||
nm = os.path.join(build_to_root, value)
|
||||
if key == 'NM.host':
|
||||
@@ -1954,6 +1958,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
||||
CommandWithWrapper('CXX.host', wrappers, cxx_host))
|
||||
if flavor == 'win':
|
||||
master_ninja.variable('ld_host', ld_host)
|
||||
master_ninja.variable('ldxx_host', ldxx_host)
|
||||
else:
|
||||
master_ninja.variable('ld_host', CommandWithWrapper(
|
||||
'LINK', wrappers, ld_host))
|
||||
|
||||
Reference in New Issue
Block a user