diff options
author | Refael Ackermann <refack@gmail.com> | 2018-10-11 14:16:00 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2018-11-04 21:51:49 -0500 |
commit | 765766be641c747b5bcb4a472801452bd041323f (patch) | |
tree | f8ea7af61244aa804db0fcc68a878802e5161e47 /common.gypi | |
parent | 809be432c07fbc87d2673888d6c4ccb9d9d20480 (diff) | |
download | node-new-765766be641c747b5bcb4a472801452bd041323f.tar.gz |
build: add common `defines`
* `V8_DEPRECATION_WARNINGS` is here for explicity. It is already defined
in `node.gypi`, and `addon.gypi`.
* `V8_IMMINENT_DEPRECATION_WARNINGS` added to warn addons authors.
* `OPENSSL_THREADS` apears in the openSSL `.h` files, and was only
defined via GYP for the node build.
PR-URL: https://github.com/nodejs/node/pull/23426
Fixes: https://github.com/nodejs/node/issues/23167
Refs: https://github.com/nodejs/node/issues/23122
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'common.gypi')
-rw-r--r-- | common.gypi | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/common.gypi b/common.gypi index e3758393c0..0ba7c8e816 100644 --- a/common.gypi +++ b/common.gypi @@ -20,12 +20,14 @@ 'node_module_version%': '', 'node_with_ltcg%': '', 'node_use_pch%': 'false', + 'node_shared_openssl%': 'false', 'node_tag%': '', 'uv_library%': 'static_library', 'clang%': 0, + 'openssl_no_asm%': 0, 'openssl_fips%': '', # Reset this number to 0 on major V8 upgrades. @@ -261,6 +263,14 @@ } } }, + + # Defines these mostly for node-gyp to pickup, and warn addon authors of + # imminent V8 deprecations, also to sync how dependencies are configured. + 'defines': [ + 'V8_DEPRECATION_WARNINGS', + 'V8_IMMINENT_DEPRECATION_WARNINGS', + ], + # Forcibly disable -Werror. We support a wide range of compilers, it's # simply not feasible to squelch all warnings, never mind that the # libraries in deps/ are not under our control. @@ -503,7 +513,18 @@ 'ldflags': [ '-Wl,--export-dynamic', ], - }] + }], + ['node_shared_openssl!="true"', { + # `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures. + 'defines': [ + 'OPENSSL_THREADS', + ], + }], + ['node_shared_openssl!="true" and openssl_no_asm==1', { + 'defines': [ + 'OPENSSL_NO_ASM', + ], + }], ], } } |