Skip to content

Commit 765766b

Browse files
committed
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: #23426 Fixes: #23167 Refs: #23122 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 809be43 commit 765766b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

common.gypi

+22-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
'node_module_version%': '',
2121
'node_with_ltcg%': '',
2222
'node_use_pch%': 'false',
23+
'node_shared_openssl%': 'false',
2324

2425
'node_tag%': '',
2526
'uv_library%': 'static_library',
2627

2728
'clang%': 0,
2829

30+
'openssl_no_asm%': 0,
2931
'openssl_fips%': '',
3032

3133
# Reset this number to 0 on major V8 upgrades.
@@ -261,6 +263,14 @@
261263
}
262264
}
263265
},
266+
267+
# Defines these mostly for node-gyp to pickup, and warn addon authors of
268+
# imminent V8 deprecations, also to sync how dependencies are configured.
269+
'defines': [
270+
'V8_DEPRECATION_WARNINGS',
271+
'V8_IMMINENT_DEPRECATION_WARNINGS',
272+
],
273+
264274
# Forcibly disable -Werror. We support a wide range of compilers, it's
265275
# simply not feasible to squelch all warnings, never mind that the
266276
# libraries in deps/ are not under our control.
@@ -503,7 +513,18 @@
503513
'ldflags': [
504514
'-Wl,--export-dynamic',
505515
],
506-
}]
516+
}],
517+
['node_shared_openssl!="true"', {
518+
# `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures.
519+
'defines': [
520+
'OPENSSL_THREADS',
521+
],
522+
}],
523+
['node_shared_openssl!="true" and openssl_no_asm==1', {
524+
'defines': [
525+
'OPENSSL_NO_ASM',
526+
],
527+
}],
507528
],
508529
}
509530
}

0 commit comments

Comments
 (0)