diff --git a/configure.py b/configure.py index a879a9661d65f7..77995d09cbadd2 100755 --- a/configure.py +++ b/configure.py @@ -1980,6 +1980,7 @@ def make_bin_override(): gyp_args = ['--no-parallel', '-Dconfiguring_node=1'] +gyp_args += ['-Dbuild_type=' + config['BUILDTYPE']] if options.use_ninja: gyp_args += ['-f', 'ninja'] diff --git a/deps/openssl/config/generate_gypi.pl b/deps/openssl/config/generate_gypi.pl index 2f5f6d1f2faa9d..707081a5fe70ef 100755 --- a/deps/openssl/config/generate_gypi.pl +++ b/deps/openssl/config/generate_gypi.pl @@ -100,7 +100,7 @@ copy("$src_dir/providers/common/include/prov/der_digests.h", "$base_dir/providers/common/include/prov/") or die "Copy failed: $!"; -my $linker_script_dir = "\$(srcdir)/deps/openssl/config/archs/$arch/$asm/providers"; +my $linker_script_dir = "<(PRODUCT_DIR)/../../deps/openssl/config/archs/$arch/$asm/providers"; my $fips_linker_script = ""; if ($fips_ld ne "") { $fips_linker_script = "$linker_script_dir/fips.ld"; diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index beb9194166ec39..7b1278044e7a70 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -7,14 +7,21 @@ 'conditions': [ ['OS == "win"', { 'obj_dir_abs': '<(PRODUCT_DIR_ABS)/obj', + 'openssl_dir': '<(PRODUCT_DIR_ABS)/obj/lib', }], ['GENERATOR == "ninja"', { 'obj_dir_abs': '<(PRODUCT_DIR_ABS)/obj', + 'modules_dir': '<(PRODUCT_DIR_ABS)/obj/lib/openssl-modules', + 'openssl_dir': '<(PRODUCT_DIR_ABS)/obj/lib', }, { 'obj_dir_abs%': '<(PRODUCT_DIR_ABS)/obj.target', + 'modules_dir': '<(PRODUCT_DIR_ABS)/obj.target/deps/openssl/lib/openssl-modules', + 'openssl_dir': '<(PRODUCT_DIR_ABS)/obj.target/deps/openssl', }], ['OS=="mac"', { 'obj_dir_abs%': '<(PRODUCT_DIR_ABS)/obj.target', + 'modules_dir': '<(PRODUCT_DIR_ABS)/obj.target/deps/openssl/lib/openssl-modules', + 'openssl_dir': '<(PRODUCT_DIR_ABS)/obj.target/deps/openssl', }], ], }, @@ -49,8 +56,8 @@ }], ['node_shared_openssl=="false"', { 'defines': [ - 'MODULESDIR="<(obj_dir_abs)/deps/openssl/lib/openssl-modules"', - 'OPENSSLDIR="<(obj_dir_abs)/deps/openssl"', + 'MODULESDIR="<(modules_dir)"', + 'OPENSSLDIR="<(openssl_dir)"', ] }], ], diff --git a/deps/openssl/openssl_common.gypi b/deps/openssl/openssl_common.gypi index dbd35ce75d4f4e..30f5936981dcfd 100644 --- a/deps/openssl/openssl_common.gypi +++ b/deps/openssl/openssl_common.gypi @@ -62,7 +62,6 @@ # linux and others 'cflags': ['-Wno-missing-field-initializers',], 'defines': [ - 'OPENSSLDIR="<(obj_dir_abs)/deps/openssl"', 'ENGINESDIR="/dev/null"', 'TERMIOS', ], diff --git a/node.gyp b/node.gyp index 39496fd0507718..989efb1aa5f9fe 100644 --- a/node.gyp +++ b/node.gyp @@ -347,15 +347,21 @@ 'variables': { 'openssl-cli': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)openssl-cli<(EXECUTABLE_SUFFIX)', 'provider_name': 'libopenssl-fipsmodule', - 'fipsmodule_internal': '<(obj_dir)/deps/openssl/<(provider_name).so', - 'fipsmodule': '<(obj_dir)/deps/openssl/lib/openssl-modules/fips.so', - 'fipsconfig': '<(obj_dir)/deps/openssl/fipsmodule.cnf', - 'opensslconfig_internal': '<(obj_dir)/deps/openssl/openssl.cnf', 'opensslconfig': './deps/openssl/openssl/apps/openssl.cnf', + 'conditions': [ + ['GENERATOR == "ninja"', { + 'fipsmodule_internal': '<(PRODUCT_DIR)/lib/<(provider_name).so', + 'fipsmodule': '<(PRODUCT_DIR)/obj/lib/openssl-modules/fips.so', + 'fipsconfig': '<(PRODUCT_DIR)/obj/lib/fipsmodule.cnf', + 'opensslconfig_internal': '<(PRODUCT_DIR)/obj/lib/openssl.cnf', + }, { + 'fipsmodule_internal': '<(PRODUCT_DIR)/obj.target/deps/openssl/<(provider_name).so', + 'fipsmodule': '<(PRODUCT_DIR)/obj.target/deps/openssl/lib/openssl-modules/fips.so', + 'fipsconfig': '<(PRODUCT_DIR)/obj/deps/openssl/fipsmodule.cnf', + 'opensslconfig_internal': '<(PRODUCT_DIR)/obj.target/deps/openssl/openssl.cnf', + }], + ], }, - #'dependencies': [ - #'./deps/openssl/openssl.gyp:openssl-fipsmodule' - #], 'actions': [ { 'action_name': 'fipsinstall', diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index b1cc704dfdc6f5..f44859d1b005ee 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -104,8 +104,12 @@ def Load( default_variables.setdefault(key, val) output_dir = params["options"].generator_output or params["options"].toplevel_dir - default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir, - default_variables['CONFIGURATION_NAME'])) + if (default_variables['GENERATOR'] == 'ninja'): + default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir, + 'out', default_variables['build_type'])) + else: + default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir, + default_variables['build_type'])) # Give the generator the opportunity to set additional variables based on # the params it will receive in the output phase.