Skip to content

Commit

Permalink
build: fix compiling addons with older versions of Node.js
Browse files Browse the repository at this point in the history
`common.gypi` is used by `node-gyp` to compile addons. Default values
must be provided for variables that may not exist on older versions of
Node.js so that older versions of Node.js can be used to compile addons
for later versions of Node.js.

Add default values for `v8_enable_pointer_compression` and
`v8_enable_31bit_smis_on_64bit_arch`.

PR-URL: nodejs#33688
Refs: nodejs#30463
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Signed-off-by: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
richardlau committed Jun 4, 2020
1 parent 3a7a5d7 commit a1e5fd2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
# https://github.com/nodejs/node/pull/22920/files#r222779926
'v8_enable_handle_zapping': 0,

# Disable pointer compression. Can be enabled at build time via configure
# options but default values are required here as this file is also used by
# node-gyp to build addons.
'v8_enable_pointer_compression%': 0,
'v8_enable_31bit_smis_on_64bit_arch%': 0,

# Disable V8 untrusted code mitigations.
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
'v8_untrusted_code_mitigations': 0,
Expand Down

0 comments on commit a1e5fd2

Please sign in to comment.