From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 10 Dec 2019 15:02:21 -0800 Subject: enable 31 bit smis on 64bit arch and ptr compression This aligns with the defaults set on the Chromium build. Without this, native node modules will have different (wrong) ideas about how v8 structs are laid out in memory on 64-bit machines, and will summarily fail to work. diff --git a/common.gypi b/common.gypi index d37d29736ead82aca6c89cc7625ca4d9a053da32..b6aa3c0504fd108ada368d30f3021d1c171a4879 100644 --- a/common.gypi +++ b/common.gypi @@ -64,7 +64,7 @@ # 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, + 'v8_enable_31bit_smis_on_64bit_arch%': 1, # Disable V8 untrusted code mitigations. # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations @@ -124,6 +124,9 @@ 'obj_dir%': '<(PRODUCT_DIR)/obj.target', 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', }], + ['target_arch == "arm64" or target_arch == "x64"', { + 'v8_enable_pointer_compression': 1, + }], ['target_arch in "ppc64 s390x"', { 'v8_enable_backtrace': 1, }],