@@ -8,39 +8,26 @@ node modules will have different (wrong) ideas about how v8 structs are laid
88out in memory on 64-bit machines, and will summarily fail to work.
99
1010diff --git a/common.gypi b/common.gypi
11- index dfcf529cd501dc890c05425fcf9a33414a45f1a5..38e7b2802f6225ac0e1ff4789b9ff8f4fb04cb79 100644
11+ index bd42d6cfa6006630d316faf2cddd93bea57102ba..734c2917535c50e260192abe6acb4726104b7b6a 100644
1212--- a/common.gypi
1313+++ b/common.gypi
14- @@ -71,6 +71,9 @@
15- # TODO(refack): make v8-perfetto happen
16- 'v8_use_perfetto': 0,
14+ @@ -64,7 +64,7 @@
15+ # options but default values are required here as this file is also used by
16+ # node-gyp to build addons.
17+ 'v8_enable_pointer_compression%': 0,
18+ - 'v8_enable_31bit_smis_on_64bit_arch%': 0,
19+ + 'v8_enable_31bit_smis_on_64bit_arch%': 1,
1720
18- + 'v8_enable_pointer_compression%': 0,
19- + 'v8_enable_31bit_smis_on_64bit_arch': 1,
20- +
21- ##### end V8 defaults #####
22-
23- # When building native modules using 'npm install' with the system npm,
24- @@ -148,6 +151,9 @@
25- ['OS=="mac"', {
26- 'clang%': 1,
21+ # Disable V8 untrusted code mitigations.
22+ # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
23+ @@ -124,6 +124,9 @@
24+ 'obj_dir%': '<(PRODUCT_DIR)/obj.target',
25+ 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
2726 }],
2827+ ['target_arch == "arm64" or target_arch == "x64"', {
2928+ 'v8_enable_pointer_compression': 1,
3029+ }],
3130 ['target_arch in "ppc64 s390x"', {
3231 'v8_enable_backtrace': 1,
3332 }],
34- @@ -378,6 +384,12 @@
35- }],
36- ],
37- }],
38- + ['v8_enable_pointer_compression == 1', {
39- + 'defines': ['V8_COMPRESS_POINTERS'],
40- + }],
41- + ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', {
42- + 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
43- + }],
44- ['OS == "win"', {
45- 'defines': [
46- 'WIN32',
33+
0 commit comments