fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules (#34844)

* fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules

* build: rely on config.gypi to enable pointer compression
This commit is contained in:
Samuel Attard 2022-07-08 01:06:06 -07:00 committed by GitHub
parent 1941c88442
commit eba9d3fc79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 3 deletions

View file

@ -14,9 +14,9 @@ NODE_DIR = os.path.join(ELECTRON_DIR, '..', 'third_party', 'electron_node')
def run_node_configure(target_cpu):
configure = os.path.join(NODE_DIR, 'configure.py')
args = ['--dest-cpu', target_cpu]
# Enabled in Chromium's V8.
if target_cpu in ('arm64', 'x64'):
args += ['--experimental-enable-pointer-compression']
# Enabled in Chromium's V8, will be disabled on 32bit via
# common.gypi rules
args += ['--experimental-enable-pointer-compression']
# Work around "No acceptable ASM compiler found" error on some System,
# it breaks nothing since Electron does not use OpenSSL.